bug fixes, features, much work on telemetry

- bugfixes
   - on reset and read from preferences.cfg file, configured lat/lon
    have been ignored.
   - fix for compressed position with ambiguity > 0

- right after boot, do not wait for a precise position.
  this avoids a jump to the configured fixed position,
  which may be very far away.
  The code will become even nicer in a next release (I'm
  currently testing with hdop.hdop(), which will have changes
  of the decision-making of storing a current location); so
  the use of no_gps_position_since_boot will become nice.

- display:
  - show P= instead of Batt= if powered from USB
  - "Up " instead of " Up " for uptime if no system time is available
  - display " LoRa-TX: dis" instead of " never TX"
  - display " GPS: no fix " instead of " no GPS fix"
      Why?: "WiFi-Cli no GPS fix" is irritating (no WiFi-Client but GPS fix?
      No, it was WiFo mode Client, and GPS without fix).
  - show P: instead tof Batt: on boot
  - show axp temperature on TTGO

- InpVolts vs BattVolts:
  Hardware without AXP chip (all except T-BEAM TTGO) have no idea of
  battery voltage. -> Changed Display and Telemetry vor this:
  InpVolts instead of VattVolts.

- system time from GPS:
  - Added check if function calls are successful
  - changed nasty code with type errors and misleading variable names
  - etc..

- manual beacon (button pressed): added next_fixed_beacon = ...

- Telemetry
  - removed dependency of define KISS_PROTOCOL
  - the AXP chip of the T-BEAM could measure temperature! Cewl..
    But we already have all 5 telemetry-positions in use.
    -> If we have no battery on boot, we have 3 fields free (Batt V,
    Current in ant out). If we have no usb on battery-boot connected,
    we have one field free for the temperature. Temperature is measured
    in steps of 0.25 degrees C.
  - The new temperature field as well as the "InputVolts vs BatteryVolts
    values" for the different devices needet a re-mix of the positions
    in the telemetry frame.
    I also decided "AC V" and "AC C" to "P V" and "P C". Trackers are
    powered on DC, not AC ;)
    For various reasons, we add temperature to the 5'th field.
    "B Out" was irritating: what, Volt, Current, Light? It's now BCout.
  - Changed equations for Volt. The problem with the old method was,
    that if you have 0 V (i.E. no battery attached), it was interpreted
    by the += 3000 level -> 3V.
    Unfortunately, the APRS spec does not define an encoding if i.E.
    a sensor is not available. ",," would be nice. But the field is
    defined exactly as ",nmo," with n, m and o as digit.
  - We had two cases for
      // DO NOT ENABLE THIS UNTIL YOU READ AND UNDERSTOOD THE IMPACT DESCRIBED ABOVE
    and people have overseen the second case. Changed the concept (one
    boolean variable).
  - Searched more than week why often EQNS are sent (while PARM, etc..
    was expected). Our local state variable (type static) sometimes,
    but not always, was set to 0 on re-entering the function block.
    -> either a compiler problem, or might be a buffer overflow corrupts
    the stack?
    After I fixed this, the same happeneed with the new local static
    variable static const boolan may_add_temperature = ...,
    which changed it's assigned value  during runtime.

- taskWebserver: made status messages more consistent.

- watchdog patches from hb9xar

Signed-off-by: Thomas Osterried <dl9sau@darc.de>
pull/10/head
Thomas Osterried 2023-03-27 18:51:03 +02:00
rodzic 8f6a308c50
commit 31fb53ca1e
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -5623,7 +5623,7 @@ behind_position_tx:
#if defined(ENABLE_TNC_SELF_TELEMETRY)
if (nextTelemetryFrame < millis()){
if (enable_tel && nextTelemetryFrame < millis()){
// Schedule the next telemetry frame
nextTelemetryFrame = millis() + (tel_interval * 1000);
sendTelemetryFrame();