code sanitizations
This commit is contained in:
parent
4f46fb21fd
commit
27fd296753
@ -138,7 +138,6 @@ void dp_init(bool verbose) {
|
||||
#endif
|
||||
|
||||
#endif // HAS_LORA
|
||||
|
||||
} // verbose
|
||||
|
||||
dp_power(cfg.screenon); // set display off if disabled
|
||||
@ -182,7 +181,6 @@ void dp_refresh(bool nextPage) {
|
||||
dp->setCursor(0, 0);
|
||||
|
||||
switch (DisplayPage) {
|
||||
|
||||
// page 0: pax + parameters overview
|
||||
// page 1: pax + lorawan parameters
|
||||
// page 2: pax + GPS lat/lon
|
||||
@ -398,7 +396,6 @@ void dp_refresh(bool nextPage) {
|
||||
DisplayPage++;
|
||||
break;
|
||||
#endif
|
||||
|
||||
} // switch (page)
|
||||
} // dp_refresh
|
||||
|
||||
|
@ -84,7 +84,6 @@ static const char TAG[] = __FILE__;
|
||||
char clientId[20] = {0}; // unique ClientID
|
||||
|
||||
void setup() {
|
||||
|
||||
char features[100] = "";
|
||||
|
||||
// disable brownout detection
|
||||
@ -487,7 +486,6 @@ void setup() {
|
||||
RTC_runmode = RUNMODE_NORMAL;
|
||||
|
||||
vTaskDelete(NULL);
|
||||
|
||||
} // setup()
|
||||
|
||||
void loop() { vTaskDelete(NULL); }
|
||||
|
@ -58,7 +58,6 @@ void PayloadConvert::addConfig(configData_t value) {
|
||||
void PayloadConvert::addStatus(uint16_t voltage, uint64_t uptime, float cputemp,
|
||||
uint32_t mem, uint8_t reset0,
|
||||
uint32_t restarts) {
|
||||
|
||||
buffer[cursor++] = highByte(voltage);
|
||||
buffer[cursor++] = lowByte(voltage);
|
||||
buffer[cursor++] = (byte)((uptime & 0xFF00000000000000) >> 56);
|
||||
|
@ -39,7 +39,6 @@ void do_reset(bool warmstart) {
|
||||
}
|
||||
|
||||
void do_after_reset(void) {
|
||||
|
||||
struct timeval sleep_stop_time;
|
||||
uint64_t sleep_time_ms;
|
||||
|
||||
@ -54,7 +53,6 @@ void do_after_reset(void) {
|
||||
#endif
|
||||
|
||||
switch (rtc_get_reset_reason(0)) {
|
||||
|
||||
case POWERON_RESET: // 0x01 Vbat power on reset
|
||||
case RTCWDT_BROWN_OUT_RESET: // 0x0f Reset when the vdd voltage is not
|
||||
// stable
|
||||
@ -102,7 +100,6 @@ void do_after_reset(void) {
|
||||
}
|
||||
|
||||
void enter_deepsleep(const uint64_t wakeup_sec, gpio_num_t wakeup_gpio) {
|
||||
|
||||
ESP_LOGI(TAG, "Preparing to sleep...");
|
||||
|
||||
RTC_runmode = RUNMODE_SLEEP;
|
||||
@ -205,4 +202,6 @@ void enter_deepsleep(const uint64_t wakeup_sec, gpio_num_t wakeup_gpio) {
|
||||
esp_deep_sleep_start();
|
||||
}
|
||||
|
||||
unsigned long long uptime() { return (RTC_millis + esp_timer_get_time() / 1000); }
|
||||
unsigned long long uptime() {
|
||||
return (RTC_millis + esp_timer_get_time() / 1000);
|
||||
}
|
@ -67,7 +67,6 @@ int print_to_sd_card(const char *fmt, va_list args) {
|
||||
#endif
|
||||
|
||||
bool openFile(FILE **fd, const char *filename) {
|
||||
|
||||
char _filename[50];
|
||||
sprintf(_filename, "%s%s", MOUNT_POINT, filename);
|
||||
|
||||
@ -81,7 +80,6 @@ bool openFile(FILE **fd, const char *filename) {
|
||||
} // openfile
|
||||
|
||||
bool sdcard_init(bool create) {
|
||||
|
||||
esp_err_t ret;
|
||||
|
||||
// for usage of SD drivers on ESP32 platform see
|
||||
@ -171,7 +169,6 @@ bool sdcard_init(bool create) {
|
||||
snprintf(bufferFilename, sizeof(bufferFilename), "/%s.csv", SDCARD_FILE_NAME);
|
||||
|
||||
if (openFile(&data_file, bufferFilename)) {
|
||||
|
||||
fpos_t position;
|
||||
fgetpos(data_file, &position);
|
||||
|
||||
@ -207,7 +204,6 @@ bool sdcard_init(bool create) {
|
||||
#endif
|
||||
|
||||
return useSDCard;
|
||||
|
||||
} // sdcard_init
|
||||
|
||||
void sdcard_flush(void) {
|
||||
@ -236,7 +232,6 @@ void sdcard_close(void) {
|
||||
|
||||
void sdcardWriteData(uint16_t noWifi, uint16_t noBle,
|
||||
__attribute__((unused)) uint16_t voltage) {
|
||||
|
||||
if (!useSDCard)
|
||||
return;
|
||||
|
||||
@ -264,4 +259,4 @@ void sdcardWriteData(uint16_t noWifi, uint16_t noBle,
|
||||
fprintf(data_file, "\n");
|
||||
}
|
||||
|
||||
#endif // (HAS_SDCARD)
|
||||
#endif // (HAS_SDCARD)
|
@ -25,7 +25,6 @@ void initSendDataTimer(uint8_t sendcycle) {
|
||||
|
||||
// put data to send in RTos Queues used for transmit over channels Lora and SPI
|
||||
void SendPayload(uint8_t port) {
|
||||
|
||||
ESP_LOGD(TAG, "sending Payload for Port %d", port);
|
||||
|
||||
MessageBuffer_t SendBuffer; // contains MessageSize, MessagePort, Message[]
|
||||
@ -69,7 +68,6 @@ void SendPayload(uint8_t port) {
|
||||
#ifdef HAS_MQTT
|
||||
mqtt_enqueuedata(&SendBuffer);
|
||||
#endif
|
||||
|
||||
} // SendPayload
|
||||
|
||||
// timer triggered function to prepare payload to send
|
||||
|
Loading…
Reference in New Issue
Block a user