unit RRFNotes;
  interface
  (*
  analog reads only up to 3.3V
  pure-analog pins (A10, A11, A21, A22, A25, A26, AREF, reset, Program) are NOT
    5V-tolerant
  Teensy 3.5 max 3.3V output is 250mA

  ToDo
      Replace TV-room board
        check depth operation
      Replace shop board (not reading AC detect)
      Replace roaming board
      Base station
         RTC battery not working.  Wiring screwed up.  Wait for new boards

  Low priority
      Base Station
        ? stop clearing files on boot
        Battery to base station
        See if battery prevents reboot on reboot of PC.
      OLED: big font

  next-version boards
      New thermostat with LM335

  *)
  implementation
  (*
    Done
      calibration memo field added to sensor types
      Base station to wall power
      BMP085Log: T, P now initialized to recent values, not 0
      code to TV-room station
      Dashboard: communication with thermostats fixed
      Dashboard: data current label fixed to local time
      Dashboard: changed chat saving to default into date-named folder
      Dashboard: mystery prefix called on X lines; fixed
      Dashboard: says RTC checked on disconnect; probably old data from connect time
      Dashboard recognized as sole controller of Global.Status
      depth gauge calibration 697-772 total immersion, 283-485 when out of water
      depth gauge color patch moved to Left = 356
      depth gauge shortened interval to allow smoothing; was 60'; 10' on reload
      depth gauge: wmDepthRaw removed
      DHT22 read failures were cabling again
      DHT22 changed ReportingInterval from 2 minutes to 15 minutes
      file system rewritten, now deletes data files as they are exhausted
      furnace cable problem fixed
      Install TV-room station
      GenericGraph: linewidth fixed by using tFastLineSeries instead of tLineSeries
      GenericGraph: added special-purpose wind-direction axis labels
      LogManager: strange logs fixed
      LogManager: new annotation line now scrolling properly
      LogManager: changed log saving to default into date-named folder
      LogManager: XBees not shown in station table; fixed
      LogManager: Progress bar eliminated.
      LogManager: log says 'dump ended'
      main form sends disconnect when closing
      OnOff manager: moved color patch to startt at Left = 356
      OnOff manager: deleted scroll bars
      OnOff manager: distinguished F & G entries
      photocell color patch moved to Left = 356
      photocell moved label to L
      power calibration from old registry
      Power manager: moved color patch to startt at Left = 356
      Power manager: deleted scroll bars
      Rain Manager: color patch moved to Left = 356
      Rain Manager: deleted scroll bars
      Roaming station reactivated
      RTC successfully written & read
      RTC label format corrected
      RTC reading has long latency
      RTC can be wrong, and it needs to be calibrated before accepting dump
        RTCSecondsBehind maintained in Globals
        UTC time of data received is corrected by RTCSecondsBehind
        when dump over
          clock is set from PC
          RTCSecondsBehind set to 0
          LinesWaiting set to zero
        dump NOT started as soon as connected.  Instead,
          on connection, RTC clock reading requested
          In base station
            Windows told how many lines waiting
            Windows told RTC battery level
            Windows told RTC reading
          when RTC reading received,
            RTCSecondsBehind updated
            if lines waiting > 0
              dump requested
      Scroll bars fixed in Wind, TRH, OnOff
      sensor windows stacked by Main form
      Shop: BMP085 working, AC detector working
      SHT15 log UIDs now all > old UIDs
      SHT15Log: T, RH, DP all now initialized to recent values, not 0
      TableManager can delete days of bad data from chosen tables
      Thermostat working
      Thermostat: resets to fallback target on close of app
      Thermostat: pogo pin installed
      Thermostat: LM335 accuracy only 3°C
      TP manager: moved color patches to startt at Left = 356
      TP manager: deleted scroll bars
      TRH manager: moved color patches to startt at Left = 356
      TRH manager: deleted scroll bars
      TV room Sensors to table
      Wind velocity not stuck at zero, but cabling is delicate.
      Wind cable fixed again 2019-08-08, finally non-Molex 2019-08-22
      Wind gauge: Changed include file to convert to complex plane and back
      Wind manager: moved color patch to start at Left = 356
      Wind manager: deleted scroll bars
      Wind gauge: changed to use elapsedMicros for anti-bounce; seems solid
      XBee: base-station version can retry getting XBee into command mode

    Timers
      In the main loop of the base station code,  there is a check whose time
    constant is 5 minutes (set in infrastructure.inc).  The timer tested against
    that limit (elmsWatchDog, defined in infrastructure.inc) is reset whenever
    any input is processed by tWindows::ProcessAppRQLine().
      LoggedSerial.pas maintains the Refresher timer.  This has an interval that
    ranges from 2 ms to 1 minute.  At each tick, the CatchUpLog routine tries to
    read all available characters from the serial port.  An ACK apparatus is now
    disabled.
      Dashboard.pas maintains the WatchDog timer.  Every 3 minutes while the base
    station connection is intact, it sends a wa Watchdog message to the base
    station.
      HC2Main.pas maintains the LastInput timer, which refreshes every 6
    seconds.  It beeps and reports.

  Power
      Booting the PC causes an interruption in USB-derived power to the BS,
    with a consequent reboot.

  On-off devices
      They are found to be on when the pin reading is BELOW the threshhold, not
    above.

  Depth
    terminated board:  dry 6.94K, we 4.3-5.3K unreliable because of low current
      limit from VOM
      want A direct to pin, read only when A high B low.
      With 560R, wet 99 (0.31V) dry 79 (0.11V)
    each upper board adds 6K
    experiment with oscilloscope & 1K resistor in series with probe suggests
      variation wet/dry with one panel will be about half a volt.
    old probe
      analog reading is 697-772 total immersion, 283-485 when out of water
      range is -2 (or so) to 10 (or so)
      if analog reading is 200, resistance of probe is ~19K
      if analog reading is 800, resistance of probe is ~1.3K
      want area graph, with depth inverted so that greater depth (below top
        of gauge) shows up as lower depth (of water)
  *)

end.
