tracker_mode correction

pull/17/head
Christian OE3CJB Bauer 2021-02-10 20:23:07 +01:00
rodzic 900812b237
commit d66bbdbfbd
2 zmienionych plików z 9 dodań i 7 usunięć

Wyświetl plik

@ -107,12 +107,14 @@ int button_ctr=0;
// bool ssd1306_found = false;
// bool axp192_found = false;
enum Tx_Mode {TRACKER, WX_TRACKER, WX_MOVE, WX_FIXED};
#define TRACKER 0
#define WX_TRACKER 1
#define WX_MOVE 2
#define WX_FIXED 3
// Position from GPS for TRACKER and WX_TRACKER
// Position for WX_ONLY from Headerfile!!!
Tx_Mode tracker_mode;
uint8_t tracker_mode;
// Pins for GPS
#ifdef T_BEAM_V1_0
@ -282,7 +284,7 @@ void setup()
for (int i=0;i<ANGLE_AVGS;i++) {average_course[i]=0;} // set average_course to "0"
prefs.begin("nvs", false);
tracker_mode = (Tx_Mode)prefs.getChar("tracker_mode", TRACKERMODE);
tracker_mode = (uint8_t) prefs.getChar("tracker_mode", TRACKERMODE);
prefs.end();
//tracker_mode = current_mode;
@ -525,7 +527,7 @@ void loop() {
break;
}
prefs.begin("nvs", false);
prefs.putChar("tracker_mode", (char)tracker_mode);
prefs.putChar("tracker_mode", (char) tracker_mode);
prefs.end();
button_ctr=0;
// ESP.restart();

Wyświetl plik

@ -41,7 +41,7 @@
// IF NOT CHANGED you have to go through the configuration routine at first boot up of the TTGO T-Beam
// #define DONT_USE_FLASH_MEMORY // uncomment if you don't want to use Flashmemory - instead data below must be corrected
#define TRACKERMODE 0 // preset MODE here, if flash not used >> 0=TRACKER, 1=WX_TRACKER, 2=WX_MOVE, 3=WX_FIXED
#define TRACKERMODE 0 // preset MODE here, if flash not used >> "0"=TRACKER, "1"=WX_TRACKER, "2"=WX_MOVE, "3"=WX_FIXED
#define CALLSIGN "XX9XXX-11" // enter your callsign here - less then 6 letter callsigns please add "spaces" so total length is 6 (without SSID)
#define WX_CALLSIGN "XX9XXX-11" // use same callsign but you can use different SSID
#define LONGITUDE_PRESET "01539.85E" // please in APRS notation DDDMM.mmE or DDDMM.mmW
@ -53,7 +53,7 @@
// "b" => BICYCLE
// "<" => MOTORCYCLE
// "R" => Recreation Vehicle
// #define HW_COMMENT // send Alt und Battery Voltage, UNcomment if don't want to send it
// #define HW_COMMENT // send Alt und Battery Voltage, UNcomment if you want to send it
#define MY_COMMENT "" // add your coment here - if empty then no comment is sent
// #define MY_COMMENT "TTGO by OE3CJB" // add your coment here - if empty then no comment is sent