commit
7cd5ff8398
@ -11,11 +11,11 @@
|
|||||||
|
|
||||||
; ---> SELECT TARGET PLATFORM HERE! <---
|
; ---> SELECT TARGET PLATFORM HERE! <---
|
||||||
[platformio]
|
[platformio]
|
||||||
env_default = generic
|
;env_default = generic
|
||||||
;env_default = heltec
|
;env_default = heltec
|
||||||
;env_default = ttgov1
|
;env_default = ttgov1
|
||||||
;env_default = ttgov2
|
;env_default = ttgov2
|
||||||
;env_default = ttgov21
|
env_default = ttgov21
|
||||||
;env_default = ttgobeam
|
;env_default = ttgobeam
|
||||||
;env_default = lopy
|
;env_default = lopy
|
||||||
;env_default = lopy4
|
;env_default = lopy4
|
||||||
|
@ -7,13 +7,13 @@ static const char TAG[] = "main";
|
|||||||
|
|
||||||
static void print_char_val_type(esp_adc_cal_value_t val_type) {
|
static void print_char_val_type(esp_adc_cal_value_t val_type) {
|
||||||
if (val_type == ESP_ADC_CAL_VAL_EFUSE_TP) {
|
if (val_type == ESP_ADC_CAL_VAL_EFUSE_TP) {
|
||||||
ESP_LOGI(TAG,
|
ESP_LOGD(TAG,
|
||||||
"ADC characterization based on Two Point values stored in eFuse");
|
"ADC characterization based on Two Point values stored in eFuse");
|
||||||
} else if (val_type == ESP_ADC_CAL_VAL_EFUSE_VREF) {
|
} else if (val_type == ESP_ADC_CAL_VAL_EFUSE_VREF) {
|
||||||
ESP_LOGI(TAG,
|
ESP_LOGD(TAG,
|
||||||
"ADC characterization based on reference voltage stored in eFuse");
|
"ADC characterization based on reference voltage stored in eFuse");
|
||||||
} else {
|
} else {
|
||||||
ESP_LOGI(TAG, "ADC characterization based on default reference voltage");
|
ESP_LOGD(TAG, "ADC characterization based on default reference voltage");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -48,7 +48,7 @@ uint16_t read_voltage(void) {
|
|||||||
#ifdef BATT_FACTOR
|
#ifdef BATT_FACTOR
|
||||||
voltage *= BATT_FACTOR;
|
voltage *= BATT_FACTOR;
|
||||||
#endif
|
#endif
|
||||||
ESP_LOGI(TAG, "Raw: %d / Voltage: %dmV", adc_reading, voltage);
|
ESP_LOGD(TAG, "Raw: %d / Voltage: %dmV", adc_reading, voltage);
|
||||||
return voltage;
|
return voltage;
|
||||||
}
|
}
|
||||||
#endif // HAS_BATTERY_PROBE
|
#endif // HAS_BATTERY_PROBE
|
@ -109,22 +109,24 @@ void refreshDisplay() {
|
|||||||
u8x8.draw2x2String(0, 0,
|
u8x8.draw2x2String(0, 0,
|
||||||
buff); // display number on unique macs total Wifi + BLE
|
buff); // display number on unique macs total Wifi + BLE
|
||||||
|
|
||||||
|
/*
|
||||||
// update Battery status (line 2)
|
// update Battery status (line 2)
|
||||||
#ifdef HAS_BATTERY_PROBE
|
#ifdef HAS_BATTERY_PROBE
|
||||||
u8x8.setCursor(0, 2);
|
u8x8.setCursor(0, 2);
|
||||||
u8x8.printf("B:%.1fV", read_voltage() / 1000.0);
|
u8x8.printf("B:%.1fV", read_voltage() / 1000.0);
|
||||||
#endif
|
#endif
|
||||||
|
*/
|
||||||
|
|
||||||
// update GPS status (line 2)
|
// update GPS status (line 2)
|
||||||
#ifdef HAS_GPS
|
#ifdef HAS_GPS
|
||||||
u8x8.setCursor(8, 2);
|
u8x8.setCursor(9, 2);
|
||||||
if (!gps.location.isValid()) // if no fix then display Sats value inverse
|
if (!gps.location.isValid()) // if no fix then display Sats value inverse
|
||||||
{
|
{
|
||||||
u8x8.setInverseFont(1);
|
u8x8.setInverseFont(1);
|
||||||
u8x8.printf("Sat:%.3d", gps.satellites.value());
|
u8x8.printf("Sats:%.2d", gps.satellites.value());
|
||||||
u8x8.setInverseFont(0);
|
u8x8.setInverseFont(0);
|
||||||
} else
|
} else
|
||||||
u8x8.printf("Sat:%.3d", gps.satellites.value());
|
u8x8.printf("Sats:%.d", gps.satellites.value());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// update bluetooth counter + LoRa SF (line 3)
|
// update bluetooth counter + LoRa SF (line 3)
|
||||||
|
@ -40,7 +40,7 @@ typedef struct {
|
|||||||
extern configData_t cfg; // current device configuration
|
extern configData_t cfg; // current device configuration
|
||||||
extern char display_line6[], display_line7[]; // screen buffers
|
extern char display_line6[], display_line7[]; // screen buffers
|
||||||
extern uint8_t channel; // wifi channel rotation counter
|
extern uint8_t channel; // wifi channel rotation counter
|
||||||
extern uint16_t macs_total, macs_wifi, macs_ble; // MAC counters
|
extern uint16_t macs_total, macs_wifi, macs_ble; // display values
|
||||||
extern std::set<uint16_t> macs; // temp storage for MACs
|
extern std::set<uint16_t> macs; // temp storage for MACs
|
||||||
extern hw_timer_t *channelSwitch, *sendCycle;
|
extern hw_timer_t *channelSwitch, *sendCycle;
|
||||||
extern portMUX_TYPE timerMux;
|
extern portMUX_TYPE timerMux;
|
||||||
|
@ -30,8 +30,7 @@ licenses. Refer to LICENSE.txt file in repository for more details.
|
|||||||
configData_t cfg; // struct holds current device configuration
|
configData_t cfg; // struct holds current device configuration
|
||||||
char display_line6[16], display_line7[16]; // display buffers
|
char display_line6[16], display_line7[16]; // display buffers
|
||||||
uint8_t channel = 0; // channel rotation counter
|
uint8_t channel = 0; // channel rotation counter
|
||||||
uint16_t macs_total = 0, macs_wifi = 0,
|
uint16_t macs_total = 0, macs_wifi = 0, macs_ble = 0; // globals for display
|
||||||
macs_ble = 0; // MAC counters globals for display
|
|
||||||
hw_timer_t *channelSwitch = NULL, *displaytimer = NULL,
|
hw_timer_t *channelSwitch = NULL, *displaytimer = NULL,
|
||||||
*sendCycle = NULL; // configure hardware timer for cyclic tasks
|
*sendCycle = NULL; // configure hardware timer for cyclic tasks
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user