Merge pull request #115 from cyberman54/master

sync dev to master
This commit is contained in:
Verkehrsrot 2018-07-22 07:39:19 +02:00 committed by GitHub
commit 7cd5ff8398
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 12 deletions

View File

@ -11,11 +11,11 @@
; ---> SELECT TARGET PLATFORM HERE! <---
[platformio]
env_default = generic
;env_default = generic
;env_default = heltec
;env_default = ttgov1
;env_default = ttgov2
;env_default = ttgov21
env_default = ttgov21
;env_default = ttgobeam
;env_default = lopy
;env_default = lopy4

View File

@ -7,13 +7,13 @@ static const char TAG[] = "main";
static void print_char_val_type(esp_adc_cal_value_t val_type) {
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");
} 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");
} 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
voltage *= BATT_FACTOR;
#endif
ESP_LOGI(TAG, "Raw: %d / Voltage: %dmV", adc_reading, voltage);
ESP_LOGD(TAG, "Raw: %d / Voltage: %dmV", adc_reading, voltage);
return voltage;
}
#endif // HAS_BATTERY_PROBE

View File

@ -109,22 +109,24 @@ void refreshDisplay() {
u8x8.draw2x2String(0, 0,
buff); // display number on unique macs total Wifi + BLE
/*
// update Battery status (line 2)
#ifdef HAS_BATTERY_PROBE
u8x8.setCursor(0, 2);
u8x8.printf("B:%.1fV", read_voltage() / 1000.0);
#endif
*/
// update GPS status (line 2)
#ifdef HAS_GPS
u8x8.setCursor(8, 2);
u8x8.setCursor(9, 2);
if (!gps.location.isValid()) // if no fix then display Sats value inverse
{
u8x8.setInverseFont(1);
u8x8.printf("Sat:%.3d", gps.satellites.value());
u8x8.printf("Sats:%.2d", gps.satellites.value());
u8x8.setInverseFont(0);
} else
u8x8.printf("Sat:%.3d", gps.satellites.value());
u8x8.printf("Sats:%.d", gps.satellites.value());
#endif
// update bluetooth counter + LoRa SF (line 3)

View File

@ -40,7 +40,7 @@ typedef struct {
extern configData_t cfg; // current device configuration
extern char display_line6[], display_line7[]; // screen buffers
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 hw_timer_t *channelSwitch, *sendCycle;
extern portMUX_TYPE timerMux;

View File

@ -30,8 +30,7 @@ licenses. Refer to LICENSE.txt file in repository for more details.
configData_t cfg; // struct holds current device configuration
char display_line6[16], display_line7[16]; // display buffers
uint8_t channel = 0; // channel rotation counter
uint16_t macs_total = 0, macs_wifi = 0,
macs_ble = 0; // MAC counters globals for display
uint16_t macs_total = 0, macs_wifi = 0, macs_ble = 0; // globals for display
hw_timer_t *channelSwitch = NULL, *displaytimer = NULL,
*sendCycle = NULL; // configure hardware timer for cyclic tasks