mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-11 07:56:39 +02:00
reduced warnings
This commit is contained in:
parent
b1f09d482f
commit
b9cec55849
3 changed files with 35 additions and 35 deletions
|
@ -283,7 +283,7 @@ void app::loop(void) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
snprintf(val, 10, "%d", millis()/1000);
|
snprintf(val, 10, "%ld", millis()/1000);
|
||||||
mMqtt.sendMsg("uptime", val);
|
mMqtt.sendMsg("uptime", val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -480,8 +480,6 @@ void app::showSetup(void) {
|
||||||
DPRINTLN(DBG_VERBOSE, F("app::showSetup"));
|
DPRINTLN(DBG_VERBOSE, F("app::showSetup"));
|
||||||
// overrides same method in main.cpp
|
// overrides same method in main.cpp
|
||||||
|
|
||||||
uint16_t interval;
|
|
||||||
|
|
||||||
String html = FPSTR(setup_html);
|
String html = FPSTR(setup_html);
|
||||||
html.replace(F("{SSID}"), mStationSsid);
|
html.replace(F("{SSID}"), mStationSsid);
|
||||||
// PWD will be left at the default value (for protection)
|
// PWD will be left at the default value (for protection)
|
||||||
|
@ -497,7 +495,6 @@ void app::showSetup(void) {
|
||||||
String inv;
|
String inv;
|
||||||
uint64_t invSerial;
|
uint64_t invSerial;
|
||||||
char name[MAX_NAME_LENGTH + 1] = {0};
|
char name[MAX_NAME_LENGTH + 1] = {0};
|
||||||
uint8_t invType;
|
|
||||||
uint16_t modPwr[4];
|
uint16_t modPwr[4];
|
||||||
for(uint8_t i = 0; i < MAX_NUM_INVERTERS; i ++) {
|
for(uint8_t i = 0; i < MAX_NUM_INVERTERS; i ++) {
|
||||||
mEep->read(ADDR_INV_ADDR + (i * 8), &invSerial);
|
mEep->read(ADDR_INV_ADDR + (i * 8), &invSerial);
|
||||||
|
@ -802,7 +799,7 @@ void app::saveValues(bool webSend = true) {
|
||||||
// address
|
// address
|
||||||
mWeb->arg("inv" + String(i) + "Addr").toCharArray(buf, 20);
|
mWeb->arg("inv" + String(i) + "Addr").toCharArray(buf, 20);
|
||||||
if(strlen(buf) == 0)
|
if(strlen(buf) == 0)
|
||||||
snprintf(buf, 20, "\0");
|
memset(buf, 0, 20);
|
||||||
addr.u64 = Serial2u64(buf);
|
addr.u64 = Serial2u64(buf);
|
||||||
mEep->write(ADDR_INV_ADDR + (i * 8), addr.u64);
|
mEep->write(ADDR_INV_ADDR + (i * 8), addr.u64);
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
#ifndef __DEBUG_H__
|
#ifndef __DEBUG_H__
|
||||||
#define __DEBUG_H__
|
#define __DEBUG_H__
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// available levels
|
// available levels
|
||||||
#define DBG_ERROR 1
|
#define DBG_ERROR 1
|
||||||
|
@ -20,12 +19,15 @@
|
||||||
// globally used level
|
// globally used level
|
||||||
#define DEBUG_LEVEL DBG_INFO
|
#define DEBUG_LEVEL DBG_INFO
|
||||||
|
|
||||||
|
#ifdef ARDUINO
|
||||||
|
#include "Arduino.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef NDEBUG
|
#ifdef NDEBUG
|
||||||
#define DBGPRINT(str)
|
#define DBGPRINT(str)
|
||||||
#define DBGPRINTLN(str)
|
#define DBGPRINTLN(str)
|
||||||
#else
|
#else
|
||||||
|
#ifdef ARDUINO
|
||||||
#ifndef DSERIAL
|
#ifndef DSERIAL
|
||||||
#define DSERIAL Serial
|
#define DSERIAL Serial
|
||||||
#endif
|
#endif
|
||||||
|
@ -55,6 +57,7 @@
|
||||||
DSERIAL.print(b,HEX);
|
DSERIAL.print(b,HEX);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if DEBUG_LEVEL >= DBG_ERROR
|
#if DEBUG_LEVEL >= DBG_ERROR
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
//-------------------------------------
|
//-------------------------------------
|
||||||
#define VERSION_MAJOR 0
|
#define VERSION_MAJOR 0
|
||||||
#define VERSION_MINOR 4
|
#define VERSION_MINOR 4
|
||||||
#define VERSION_PATCH 20
|
#define VERSION_PATCH 21
|
||||||
|
|
||||||
|
|
||||||
//-------------------------------------
|
//-------------------------------------
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue