Many fixes, improvements and new features
Changelog of 2022-08-21: show time constantly in line1 show time now in line1 (comes from system clock, either set from gps or by ntp-client) show uptime in line1 show wifi / webserver state in line2 (CLI|AP|off) show time until next tx in line Text updates in index.html Code beautifying Signed-off-by: DL3EL <dl3el@darc.de> Also code beautifying Signed-off-by: Thomas Osterried <dl9sau@darc.de> Changelog of 2022-08-20: - new web option - Option Send Course/Speed along with Altitude. Option "Show Altitude in compressed position" removed. - Added hint for min/max values in tooltip - Tips for reducing power - platformio.ini: - enabled ENABLE_TNC_SELF_TELEMETRY. Reason: imho, no really need for telemetry. But code is not much. Tried to configure it in web-iface for debug purpose and it had no effect (because it was not compiled in). - always_send_cseSpd_AND_altitude feature (see also webconfig) - sendpacket() now gets information (flags) why / for what it is called This is for deciding, if you send altitude with each transmission (then course/speed is always sent in compressed format, and /A=...... is added to the message text). [Vice versa is not allowed due to spec] If disabled, one transmission has course/speed and the next one altitude (depending on altitude ratio). Pretty cewl ;) - improvements on display output - improvements for handling gps state change valid/invalid. Lesser (better) cpu-consuming storage of last position. It's now handled in one routine at start of the main loop. - mheard list: json list was cuted. -> - DynamicJsonDocument doc(MAX_RECEIVED_LIST_SIZE * 500); + DynamicJsonDocument doc(MAX_RECEIVED_LIST_SIZE * 1000); But we still face the problem of empty mheard lists in the webinterface. -> STILL NEED FOR FIX - webserver - wifi client / AP: Fix. If you loose connection to the AP, we now go to the algorithm again for reconnect, or start own AP. And if no client is associated in AP mode, we also try to re-determine. -> moved to new function restart_AP_or_STA() Reconnect also if we are STA and got no IP address by dhcp (there are some known compatibility issues with some dhcp-serrvers, where on dhcp refresh we lost the gateway): if (WiFi.getMode() == 1 && (WiFi.status() != WL_CONNECTED || WiFi.localIP() == IP_NULL || WiFi.subnetMask() == IP_SUBNET_NULL || WiFi.gatewayIP() == IP_GATEWAY_NULL)) - wifi status now with one status variable, i.E.: wifi_connection_status = WIFI_RUNNING_AS_AP; Used in the main program for display routine. - system clock now set from gps time === dl3el's commit messages (newest on top) - update time and sec of next beacon per second, even if rxshow is >0 - show gps time in OLED - smoothen speed in OLED. display current Position, Uptime & Satt Info on Website - bug fix in WebServer: Enable Wifi menu did not show the currently selected value - Features: - Change gps reception in main loop - do not accept gps data when hdop is > 8 - when gps data is invalid, show gps.location.age - when beacon is send manually and reset the timer for fixed beacon - when oled is constantly on, refresh screen every second - show wifi mode on screen (CLI or AP, run or stopped) - show SSID & IP on screen when manual tx (button, web) and as boot message - Bugfixes: - manual send works now, when oled is constantly o - fix output to Oled Display - reenable GPS: show alt in Display delay first AUT TX if fixed beacon is on - show Discharge mA in OLED for optimization === And finally, from the old changelog with changes since the last release: Changelog of 2022-08-09: Fix - logical error for setting lora chip to sleep after tx; affected users with digipeating mode switched off. -> They did not receive any RF packets. Improvements: - hack for re-enabling webserver if it was switched off_ moved from the short-pressed beacon button to the long-pressed GPS button. Thanks to Thomas Beiderwieden <dl3el> for the patch. Feature - If you press the GPS button, on your OLED display now your AP name and IP address are displayed. Thanks to Thomas Beiderwieden <dl3el> for the patch. - Known issues The first Menu in the webinterface, "Enable WIFI", stores the chosen value. You can see it in the json config, and how boot-up behaves (-> correctly stored in the preferences). But: the chooser always displays Menu item 1 as active. Signed-off-by: Thomas Osterried <dl9sau@darc.de> Changelog of 2022-08-07: Major improvements and smaller bugfixes - feature: option to disable wifi. Saves abt 80mA current 3 options: 2 alaways on; 1 off if no bluetooth client is connected in between 60s after boot (watch red oled button; goes off as soon as a bt client connects in the boot phase). 0 disable (re-enabl by pressing beacon button) - pseudo csma/cd. ppersist / slottime as we know it from standard packet-radio / -APRS In loaSend. TODO: better concept with a tx-queue. But this is rather complex, because the queue must not grow too large, else we re-send old packts.. - feature to encode altitude in compressed position instead of /A=... compressed position can encode course/speed, altitude (and others). Option to send course/speed to 0%, 100% or something in between. altitude check button is obsolete. Switch off by setting alt ratio to 0. - cross-digipeating: just for sure, clear rx queue after going back to main freq. - if we are not a digipeater and we have no serial-bt-client, we may let the loraChip sleep (axp.setPowerOutPut(AXP192_LDO2, AXP202_OFF)) -> saves current (a bit) - adjust_cpu_freq_to: change CPU frequency. May reduce cpu power consumption up to 20 %. Suggesting (and tested with) 80 MHz. USE WITH CARE! I.e. 40 MHz or 20 MHz did not work with my device (boot phase never ended) - options to start tncServer and gpsServer (if you don't need them, you may not like to expose these tcp ports to your LAN or HAMNET) - changed preferences.getString(PREFxxxxx) to preferences.getString(PREFxxxxx, ""), because if variable is not set, the preferences library returns "the variable name itself" - wtf!. In the case of PREF_NTP_SERVER, we saw log messages that ntp server with fqdn "ntp_server" could not be resolved; it had no impact, because it did a failback to the compiled-in default. Changed call for PREF_WIFI_PASSWORD, PREF_AP_PASSWORD, etc.. too. - wifi-AP: is set to esp_wifi_set_max_tx_power(8) (for lesser power consumption of the devie). 8 dBm are too less fore some cases. -> New web config for setting max_tx_power in AP- and STA- modes. - Fix: In mode wifi-client, it did not reconnect if association was lost. - small improvement for comment-text ratelimiting BG_RF95.cpp: BG_RF95::SignalDetected feature (needed for pseudo csma/cd) Signed-off-by: Thomas Osterried <dl9sau@darc.de>pull/5/head refs/heads/master-2022-08-21T201051
rodzic
d97a3bb863
commit
ba8c81ba74
|
@ -2819,25 +2819,27 @@ void loop() {
|
||||||
time_last_own_position_via_kiss_received = time_last_frame_via_kiss_received;
|
time_last_own_position_via_kiss_received = time_last_frame_via_kiss_received;
|
||||||
if (!acceptOwnPositionReportsViaKiss)
|
if (!acceptOwnPositionReportsViaKiss)
|
||||||
goto out; // throw away this frame.
|
goto out; // throw away this frame.
|
||||||
was_own_position_packet = true;
|
was_own_position_packet = true;
|
||||||
if (!dont_send_own_position_packets) {
|
if (!dont_send_own_position_packets) {
|
||||||
gps_state_before_autochange = gps_state;
|
gps_state_before_autochange = gps_state;
|
||||||
if (gps_allow_sleep_while_kiss) {
|
if (gps_allow_sleep_while_kiss) {
|
||||||
#ifdef T_BEAM_V1_0
|
#ifdef T_BEAM_V1_0
|
||||||
if (gps_state)
|
if (gps_state)
|
||||||
axp.setPowerOutPut(AXP192_LDO3, AXP202_OFF); // switch off GPS
|
axp.setPowerOutPut(AXP192_LDO3, AXP202_OFF); // switch off GPS
|
||||||
#endif
|
|
||||||
gps_state = false;
|
|
||||||
}
|
|
||||||
dont_send_own_position_packets = true;
|
|
||||||
// TODO: there are also tcp kiss devices. Instead of 'kiss_client_came_via_bluetooth', we should mark it in a session struct where we can iterate through
|
|
||||||
#ifdef ENABLE_BLUETOOTH
|
|
||||||
if (SerialBT.hasClient())
|
|
||||||
kiss_client_came_via_bluetooth = true;
|
|
||||||
#endif
|
#endif
|
||||||
|
gps_state = false;
|
||||||
}
|
}
|
||||||
} else if (*p == ':')
|
dont_send_own_position_packets = true;
|
||||||
time_last_own_text_message_via_kiss_received = millis();
|
// TODO: there are also tcp kiss devices. Instead of 'kiss_client_came_via_bluetooth', we should mark it in a session struct where we can iterate through
|
||||||
|
#ifdef ENABLE_BLUETOOTH
|
||||||
|
if (SerialBT.hasClient())
|
||||||
|
kiss_client_came_via_bluetooth = true;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
} else if (*p == ':') {
|
||||||
|
time_last_own_text_message_via_kiss_received = millis();
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (lora_digipeating_mode > 1) {
|
if (lora_digipeating_mode > 1) {
|
||||||
const char *p = strchr(data, '>');
|
const char *p = strchr(data, '>');
|
||||||
|
@ -2973,6 +2975,7 @@ out:
|
||||||
char *digipeatedflag = strchr(received_frame, '*');
|
char *digipeatedflag = strchr(received_frame, '*');
|
||||||
if (digipeatedflag && digipeatedflag > header_end)
|
if (digipeatedflag && digipeatedflag > header_end)
|
||||||
digipeatedflag = 0;
|
digipeatedflag = 0;
|
||||||
|
|
||||||
char *q;
|
char *q;
|
||||||
|
|
||||||
uint8_t our_packet = 0; // 1: from us. 2: digipeated by us
|
uint8_t our_packet = 0; // 1: from us. 2: digipeated by us
|
||||||
|
@ -3012,9 +3015,9 @@ out:
|
||||||
if (!q || q > header_end) {
|
if (!q || q > header_end) {
|
||||||
s = 0;
|
s = 0;
|
||||||
if (((lora_add_snr_rssi_to_path & FLAG_ADD_SNR_RSSI_FOR_APRSIS) || user_demands_trace > 1) ||
|
if (((lora_add_snr_rssi_to_path & FLAG_ADD_SNR_RSSI_FOR_APRSIS) || user_demands_trace > 1) ||
|
||||||
(!digipeatedflag && ((lora_add_snr_rssi_to_path & FLAG_ADD_SNR_RSSI_FOR_APRSIS__ONLY_IF_HEARD_DIRECT) || user_demands_trace == 1)) )
|
(!digipeatedflag && ((lora_add_snr_rssi_to_path & FLAG_ADD_SNR_RSSI_FOR_APRSIS__ONLY_IF_HEARD_DIRECT) || user_demands_trace == 1)) )
|
||||||
s = append_element_to_path(received_frame, rssi_for_path);
|
s = append_element_to_path(received_frame, rssi_for_path);
|
||||||
send_to_aprsis(s ? String(s) : loraReceivedFrameString);
|
send_to_aprsis(s ? String(s) : loraReceivedFrameString);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3032,7 +3035,7 @@ out:
|
||||||
#ifdef KISS_PROTOCOL
|
#ifdef KISS_PROTOCOL
|
||||||
s = 0;
|
s = 0;
|
||||||
if (((lora_add_snr_rssi_to_path & FLAG_ADD_SNR_RSSI_FOR_KISS) || user_demands_trace > 1) ||
|
if (((lora_add_snr_rssi_to_path & FLAG_ADD_SNR_RSSI_FOR_KISS) || user_demands_trace > 1) ||
|
||||||
(!digipeatedflag && ((lora_add_snr_rssi_to_path & FLAG_ADD_SNR_RSSI_FOR_KISS__ONLY_IF_HEARD_DIRECT) || user_demands_trace == 1)) )
|
(!digipeatedflag && ((lora_add_snr_rssi_to_path & FLAG_ADD_SNR_RSSI_FOR_KISS__ONLY_IF_HEARD_DIRECT) || user_demands_trace == 1)) )
|
||||||
|
|
||||||
s = kiss_add_snr_rssi_to_path_at_position_without_digippeated_flag ? append_element_to_path(received_frame, rssi_for_path) : add_element_to_path(received_frame, rssi_for_path);
|
s = kiss_add_snr_rssi_to_path_at_position_without_digippeated_flag ? append_element_to_path(received_frame, rssi_for_path) : add_element_to_path(received_frame, rssi_for_path);
|
||||||
sendToTNC(s ? String(s) : loraReceivedFrameString);
|
sendToTNC(s ? String(s) : loraReceivedFrameString);
|
||||||
|
|
Ładowanie…
Reference in New Issue