mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-30 09:16:11 +02:00
0.7.40
* added default pins for opendtu-fusion-v1 board * fixed hw version display in `live` * removed development builds, renamed environments in `platform.ini`
This commit is contained in:
parent
8f0bbfc93c
commit
fd2fd206f0
12 changed files with 140 additions and 149 deletions
|
@ -1,5 +1,10 @@
|
|||
# Development Changes
|
||||
|
||||
## 0.7.40 - 2023-08-21
|
||||
* added default pins for opendtu-fusion-v1 board
|
||||
* fixed hw version display in `live`
|
||||
* removed development builds, renamed environments in `platform.ini`
|
||||
|
||||
## 0.7.39 - 2023-08-21
|
||||
* fix background color of invalid inputs
|
||||
* add hardware info (click in `live` on inverter name)
|
||||
|
|
|
@ -7,6 +7,10 @@
|
|||
#define __CONFIG_H__
|
||||
|
||||
|
||||
// globally used
|
||||
#define DEF_PIN_OFF 255
|
||||
|
||||
|
||||
//-------------------------------------
|
||||
// WIFI CONFIGURATION
|
||||
//-------------------------------------
|
||||
|
@ -60,25 +64,66 @@
|
|||
// for the ESP32-S3 there is no sane 'default', as it has full flexibility
|
||||
// to map its two HW SPIs anywhere and PCBs differ materially,
|
||||
// so it has to be selected in the Web UI
|
||||
#define DEF_CS_PIN 5
|
||||
#define DEF_CE_PIN 17
|
||||
#define DEF_IRQ_PIN 16
|
||||
#define DEF_MISO_PIN 19
|
||||
#define DEF_MOSI_PIN 23
|
||||
#define DEF_SCLK_PIN 18
|
||||
#ifndef DEF_NRF_CS_PIN
|
||||
#define DEF_NRF_CS_PIN 5
|
||||
#endif
|
||||
#ifndef DEF_NRF_CE_PIN
|
||||
#define DEF_NRF_CE_PIN 17
|
||||
#endif
|
||||
#ifndef DEF_NRF_IRQ_PIN
|
||||
#define DEF_NRF_IRQ_PIN 16
|
||||
#endif
|
||||
#ifndef DEF_NRF_MISO_PIN
|
||||
#define DEF_NRF_MISO_PIN 19
|
||||
#endif
|
||||
#ifndef DEF_NRF_MOSI_PIN
|
||||
#define DEF_NRF_MOSI_PIN 23
|
||||
#endif
|
||||
#ifndef DEF_NRF_SCLK_PIN
|
||||
#define DEF_NRF_SCLK_PIN 18
|
||||
#endif
|
||||
|
||||
#define DEF_CMT_CSB 27
|
||||
#define DEF_CMT_FCSB 26
|
||||
#define DEF_CMT_IRQ 34
|
||||
#ifndef DEF_CMT_CSB
|
||||
#define DEF_CMT_CSB 27
|
||||
#endif
|
||||
#ifndef DEF_CMT_FCSB
|
||||
#define DEF_CMT_FCSB 26
|
||||
#endif
|
||||
#ifndef DEF_CMT_IRQ
|
||||
#define DEF_CMT_IRQ 34
|
||||
#endif
|
||||
#else
|
||||
#define DEF_CS_PIN 15
|
||||
#define DEF_CE_PIN 0
|
||||
#define DEF_IRQ_PIN 2
|
||||
#ifndef DEF_NRF_CS_PIN
|
||||
#define DEF_NRF_CS_PIN 15
|
||||
#endif
|
||||
#ifndef DEF_NRF_CE_PIN
|
||||
#define DEF_NRF_CE_PIN 0
|
||||
#endif
|
||||
#ifndef DEF_NRF_IRQ_PIN
|
||||
#define DEF_NRF_IRQ_PIN 2
|
||||
#endif
|
||||
// these are given to relay the correct values via API
|
||||
// they cannot actually be moved for ESP82xx models
|
||||
#define DEF_MISO_PIN 12
|
||||
#define DEF_MOSI_PIN 13
|
||||
#define DEF_SCLK_PIN 14
|
||||
#ifndef DEF_NRF_MISO_PIN
|
||||
#define DEF_NRF_MISO_PIN 12
|
||||
#endif
|
||||
#ifndef DEF_NRF_MOSI_PIN
|
||||
#define DEF_NRF_MOSI_PIN 13
|
||||
#endif
|
||||
#ifndef DEF_NRF_SCLK_PIN
|
||||
#define DEF_NRF_SCLK_PIN 14
|
||||
#endif
|
||||
#endif
|
||||
#ifndef DEF_LED0
|
||||
#define DEF_LED0 DEF_PIN_OFF
|
||||
#endif
|
||||
#ifndef DEF_LED1
|
||||
#define DEF_LED1 DEF_PIN_OFF
|
||||
#endif
|
||||
#ifdef LED_ACTIVE_HIGH
|
||||
#define LED_HIGH_ACTIVE true
|
||||
#else
|
||||
#define LED_HIGH_ACTIVE false
|
||||
#endif
|
||||
|
||||
// default NRF24 power, possible values (0 - 3)
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
* More info:
|
||||
* https://arduino-esp8266.readthedocs.io/en/latest/filesystem.html#flash-layout
|
||||
* */
|
||||
#define DEF_PIN_OFF 255
|
||||
|
||||
|
||||
#define PROT_MASK_INDEX 0x0001
|
||||
|
@ -385,12 +384,12 @@ class settings {
|
|||
|
||||
mCfg.nrf.sendInterval = SEND_INTERVAL;
|
||||
mCfg.nrf.maxRetransPerPyld = DEF_MAX_RETRANS_PER_PYLD;
|
||||
mCfg.nrf.pinCs = DEF_CS_PIN;
|
||||
mCfg.nrf.pinCe = DEF_CE_PIN;
|
||||
mCfg.nrf.pinIrq = DEF_IRQ_PIN;
|
||||
mCfg.nrf.pinMiso = DEF_MISO_PIN;
|
||||
mCfg.nrf.pinMosi = DEF_MOSI_PIN;
|
||||
mCfg.nrf.pinSclk = DEF_SCLK_PIN;
|
||||
mCfg.nrf.pinCs = DEF_NRF_CS_PIN;
|
||||
mCfg.nrf.pinCe = DEF_NRF_CE_PIN;
|
||||
mCfg.nrf.pinIrq = DEF_NRF_IRQ_PIN;
|
||||
mCfg.nrf.pinMiso = DEF_NRF_MISO_PIN;
|
||||
mCfg.nrf.pinMosi = DEF_NRF_MOSI_PIN;
|
||||
mCfg.nrf.pinSclk = DEF_NRF_SCLK_PIN;
|
||||
|
||||
mCfg.nrf.amplifierPower = DEF_AMPLIFIERPOWER & 0x03;
|
||||
mCfg.nrf.enabled = true;
|
||||
|
@ -433,9 +432,9 @@ class settings {
|
|||
mCfg.inst.rstMaxValsMidNight = false;
|
||||
mCfg.inst.yieldEffiency = 0.955f;
|
||||
|
||||
mCfg.led.led0 = DEF_PIN_OFF;
|
||||
mCfg.led.led1 = DEF_PIN_OFF;
|
||||
mCfg.led.led_high_active = false;
|
||||
mCfg.led.led0 = DEF_LED0;
|
||||
mCfg.led.led1 = DEF_LED1;
|
||||
mCfg.led.led_high_active = LED_HIGH_ACTIVE;
|
||||
|
||||
memset(&mCfg.inst, 0, sizeof(cfgInst_t));
|
||||
|
||||
|
@ -522,12 +521,12 @@ class settings {
|
|||
mCfg.nrf.enabled = (bool) obj[F("en")];
|
||||
#endif
|
||||
if((obj[F("cs")] == obj[F("ce")])) {
|
||||
mCfg.nrf.pinCs = DEF_CS_PIN;
|
||||
mCfg.nrf.pinCe = DEF_CE_PIN;
|
||||
mCfg.nrf.pinIrq = DEF_IRQ_PIN;
|
||||
mCfg.nrf.pinSclk = DEF_SCLK_PIN;
|
||||
mCfg.nrf.pinMosi = DEF_MOSI_PIN;
|
||||
mCfg.nrf.pinMiso = DEF_MISO_PIN;
|
||||
mCfg.nrf.pinCs = DEF_NRF_CS_PIN;
|
||||
mCfg.nrf.pinCe = DEF_NRF_CE_PIN;
|
||||
mCfg.nrf.pinIrq = DEF_NRF_IRQ_PIN;
|
||||
mCfg.nrf.pinSclk = DEF_NRF_SCLK_PIN;
|
||||
mCfg.nrf.pinMosi = DEF_NRF_MOSI_PIN;
|
||||
mCfg.nrf.pinMiso = DEF_NRF_MISO_PIN;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
//-------------------------------------
|
||||
#define VERSION_MAJOR 0
|
||||
#define VERSION_MINOR 7
|
||||
#define VERSION_PATCH 39
|
||||
#define VERSION_PATCH 40
|
||||
|
||||
//-------------------------------------
|
||||
typedef struct {
|
||||
|
|
|
@ -268,11 +268,11 @@ const devInfo_t devInfo[] = {
|
|||
{ 0x101020, 350 },
|
||||
{ 0x101030, 400 },
|
||||
{ 0x101040, 400 },
|
||||
{ 0x101110, 600 },
|
||||
{ 0x101110, 600 }, // [TSOL800(DE) ..20, HWv=??], [HM-600 ..20, HWv=2.66]
|
||||
{ 0x101120, 700 },
|
||||
{ 0x101130, 800 },
|
||||
{ 0x101140, 800 },
|
||||
{ 0x101210, 1200 },
|
||||
{ 0x101210, 1200 }, // ..00
|
||||
{ 0x101230, 1500 },
|
||||
|
||||
// HMS
|
||||
|
@ -287,12 +287,12 @@ const devInfo_t devInfo[] = {
|
|||
{ 0x102241, 1600 },
|
||||
{ 0x101251, 1800 },
|
||||
{ 0x102251, 1800 },
|
||||
{ 0x101271, 2000 },
|
||||
{ 0x101271, 2000 }, // ..00
|
||||
{ 0x102271, 2000 },
|
||||
|
||||
// HMT
|
||||
{ 0x103311, 1800 },
|
||||
{ 0x103331, 2250 }
|
||||
{ 0x103331, 2250 } // ..00
|
||||
};
|
||||
|
||||
#endif /*__HM_DEFINES_H__*/
|
||||
|
|
|
@ -27,7 +27,7 @@ const char* const rf24AmpPowerNames[] = {"MIN", "LOW", "HIGH", "MAX"};
|
|||
//-----------------------------------------------------------------------------
|
||||
// HM Radio class
|
||||
//-----------------------------------------------------------------------------
|
||||
template <uint8_t IRQ_PIN = DEF_IRQ_PIN, uint8_t CE_PIN = DEF_CE_PIN, uint8_t CS_PIN = DEF_CS_PIN, uint8_t AMP_PWR = RF24_PA_LOW, uint8_t SCLK_PIN = DEF_SCLK_PIN, uint8_t MOSI_PIN = DEF_MOSI_PIN, uint8_t MISO_PIN = DEF_MISO_PIN>
|
||||
template <uint8_t IRQ_PIN = DEF_NRF_IRQ_PIN, uint8_t CE_PIN = DEF_NRF_CE_PIN, uint8_t CS_PIN = DEF_NRF_CS_PIN, uint8_t AMP_PWR = RF24_PA_LOW, uint8_t SCLK_PIN = DEF_NRF_SCLK_PIN, uint8_t MOSI_PIN = DEF_NRF_MOSI_PIN, uint8_t MISO_PIN = DEF_NRF_MISO_PIN>
|
||||
class HmRadio {
|
||||
public:
|
||||
HmRadio() : mNrf24(CE_PIN, CS_PIN, SPI_SPEED) {
|
||||
|
|
|
@ -32,125 +32,60 @@ lib_deps =
|
|||
https://github.com/JChristensen/Timezone @ ^1.2.4
|
||||
olikraus/U8g2 @ ^2.34.17
|
||||
zinggjm/GxEPD2 @ ^1.5.2
|
||||
build_flags =
|
||||
-std=c++17
|
||||
-std=gnu++17
|
||||
build_unflags =
|
||||
-std=gnu++11
|
||||
|
||||
|
||||
[env:esp8266-release]
|
||||
[env:esp8266]
|
||||
platform = espressif8266
|
||||
board = esp12e
|
||||
board_build.f_cpu = 80000000L
|
||||
build_flags =
|
||||
-D RELEASE
|
||||
-std=gnu++17
|
||||
build_flags = ${env.build_flags}
|
||||
-DEMC_MIN_FREE_MEMORY=4096
|
||||
;-Wl,-Map,output.map
|
||||
monitor_filters =
|
||||
esp8266_exception_decoder
|
||||
|
||||
|
||||
[env:esp8266-release-prometheus]
|
||||
[env:esp8266-prometheus]
|
||||
platform = espressif8266
|
||||
board = esp12e
|
||||
board_build.f_cpu = 80000000L
|
||||
build_flags =
|
||||
-D RELEASE
|
||||
-std=gnu++17
|
||||
build_flags = ${env.build_flags}
|
||||
-DENABLE_PROMETHEUS_EP
|
||||
-DEMC_MIN_FREE_MEMORY=4096
|
||||
monitor_filters =
|
||||
esp8266_exception_decoder
|
||||
|
||||
[env:esp8266-debug]
|
||||
platform = espressif8266
|
||||
board = esp12e
|
||||
board_build.f_cpu = 80000000L
|
||||
build_flags =
|
||||
-DDEBUG_LEVEL=DBG_DEBUG
|
||||
-std=gnu++17
|
||||
-DEMC_MIN_FREE_MEMORY=4096
|
||||
-DDEBUG_ESP_CORE
|
||||
-DDEBUG_ESP_WIFI
|
||||
-DDEBUG_ESP_HTTP_CLIENT
|
||||
-DDEBUG_ESP_HTTP_SERVER
|
||||
-DDEBUG_ESP_OOM
|
||||
-DDEBUG_ESP_PORT=Serial
|
||||
-DPIO_FRAMEWORK_ARDUINO_MMU_CACHE16_IRAM48
|
||||
build_type = debug
|
||||
monitor_filters =
|
||||
time ; Add timestamp with milliseconds for each new line
|
||||
log2file ; Log data to a file “platformio-device-monitor-*.log” located in the current working directory
|
||||
|
||||
[env:esp8285-release]
|
||||
[env:esp8285]
|
||||
platform = espressif8266
|
||||
board = esp8285
|
||||
board_build.ldscript = eagle.flash.1m64.ld
|
||||
board_build.f_cpu = 80000000L
|
||||
build_flags =
|
||||
-D RELEASE
|
||||
-std=gnu++17
|
||||
build_flags = ${env.build_flags}
|
||||
-DEMC_MIN_FREE_MEMORY=4096
|
||||
monitor_filters =
|
||||
time ; Add timestamp with milliseconds for each new line
|
||||
esp8266_exception_decoder
|
||||
|
||||
[env:esp8285-debug]
|
||||
platform = espressif8266
|
||||
board = esp8285
|
||||
board_build.ldscript = eagle.flash.1m64.ld
|
||||
board_build.f_cpu = 80000000L
|
||||
build_flags =
|
||||
-DDEBUG_LEVEL=DBG_DEBUG
|
||||
-DEMC_MIN_FREE_MEMORY=4096
|
||||
-DDEBUG_ESP_CORE
|
||||
-DDEBUG_ESP_WIFI
|
||||
-DDEBUG_ESP_HTTP_CLIENT
|
||||
-DDEBUG_ESP_HTTP_SERVER
|
||||
-DDEBUG_ESP_OOM
|
||||
-DDEBUG_ESP_PORT=Serial
|
||||
build_type = debug
|
||||
monitor_filters =
|
||||
time ; Add timestamp with milliseconds for each new line
|
||||
log2file ; Log data to a file “platformio-device-monitor-*.log” located in the current working directory
|
||||
|
||||
[env:esp32-wroom32-release]
|
||||
[env:esp32-wroom32]
|
||||
platform = espressif32@6.1.0
|
||||
board = lolin_d32
|
||||
build_flags =
|
||||
-D RELEASE
|
||||
-std=gnu++17
|
||||
build_unflags = -std=gnu++11
|
||||
build_flags = ${env.build_flags}
|
||||
monitor_filters =
|
||||
esp32_exception_decoder
|
||||
|
||||
[env:esp32-wroom32-release-prometheus]
|
||||
[env:esp32-wroom32-prometheus]
|
||||
platform = espressif32@6.1.0
|
||||
board = lolin_d32
|
||||
build_flags =
|
||||
-D RELEASE
|
||||
-std=gnu++17
|
||||
build_flags = ${env.build_flags}
|
||||
-DENABLE_PROMETHEUS_EP
|
||||
build_unflags = -std=gnu++11
|
||||
monitor_filters =
|
||||
esp32_exception_decoder
|
||||
|
||||
[env:esp32-wroom32-debug]
|
||||
platform = espressif32@6.1.0
|
||||
board = lolin_d32
|
||||
build_flags =
|
||||
-DDEBUG_LEVEL=DBG_DEBUG
|
||||
-DDEBUG_ESP_CORE
|
||||
-DDEBUG_ESP_WIFI
|
||||
-DDEBUG_ESP_HTTP_CLIENT
|
||||
-DDEBUG_ESP_HTTP_SERVER
|
||||
-DDEBUG_ESP_OOM
|
||||
-DDEBUG_ESP_PORT=Serial
|
||||
-std=gnu++17
|
||||
build_unflags = -std=gnu++11
|
||||
build_type = debug
|
||||
monitor_filters =
|
||||
time ; Add timestamp with milliseconds for each new line
|
||||
log2file ; Log data to a file “platformio-device-monitor-*.log” located in the current working directory
|
||||
|
||||
|
||||
[env:esp32-wroom32-ethernet-release]
|
||||
[env:esp32-wroom32-ethernet]
|
||||
platform = espressif32
|
||||
board = esp32dev
|
||||
lib_deps =
|
||||
|
@ -163,25 +98,32 @@ lib_deps =
|
|||
https://github.com/JChristensen/Timezone @ ^1.2.4
|
||||
olikraus/U8g2 @ ^2.34.17
|
||||
zinggjm/GxEPD2 @ ^1.5.2
|
||||
build_flags =
|
||||
build_flags = ${env.build_flags}
|
||||
-D ETHERNET
|
||||
-DRELEASE
|
||||
-DLOG_LOCAL_LEVEL=ESP_LOG_INFO
|
||||
-DDEBUG_LEVEL=DBG_INFO
|
||||
-std=gnu++17
|
||||
build_unflags = -std=gnu++11
|
||||
monitor_filters =
|
||||
esp32_exception_decoder
|
||||
|
||||
[env:opendtufusionv1-release]
|
||||
[env:opendtufusionv1]
|
||||
platform = espressif32@6.1.0
|
||||
board = esp32-s3-devkitc-1
|
||||
upload_protocol = esp-builtin
|
||||
debug_tool = esp-builtin
|
||||
debug_speed = 12000
|
||||
build_flags =
|
||||
-D RELEASE
|
||||
-std=gnu++17
|
||||
build_unflags = -std=gnu++11
|
||||
build_flags = ${env.build_flags}
|
||||
-DDEF_NRF_CS_PIN=37
|
||||
-DDEF_NRF_CE_PIN=38
|
||||
-DDEF_NRF_IRQ_PIN=47
|
||||
-DDEF_NRF_MISO_PIN=48
|
||||
-DDEF_NRF_MOSI_PIN=35
|
||||
-DDEF_NRF_SCLK_PIN=36
|
||||
-DDEF_CMT_CSB=4
|
||||
-DDEF_CMT_FCSB=21
|
||||
-DDEF_CMT_IRQ=8
|
||||
-DDEF_LED0=17
|
||||
-DDEF_LED1=18
|
||||
-DLED_ACTIVE_HIGH
|
||||
monitor_filters =
|
||||
time ; Add timestamp with milliseconds for each new line
|
||||
esp32_exception_decoder
|
||||
|
|
|
@ -276,7 +276,7 @@
|
|||
]),
|
||||
ml("tr", {}, [
|
||||
ml("th", {}, "Hardware Version / Build"),
|
||||
ml("td", {}, (obj.hw_ver.toString(16) / 100).toFixed(2) + " (build: " + String(obj.prod_cw) + "/" + String(obj.prod_year) + ")")
|
||||
ml("td", {}, (obj.hw_ver/100).toFixed(2) + " (build: " + String(obj.prod_cw) + "/" + String(obj.prod_year) + ")")
|
||||
]),
|
||||
ml("tr", {}, [
|
||||
ml("th", {}, "Hardware Number"),
|
||||
|
@ -284,7 +284,7 @@
|
|||
]),
|
||||
ml("tr", {}, [
|
||||
ml("th", {}, "Bootloader Version"),
|
||||
ml("td", {}, (obj.boot_ver / 100).toFixed(2))
|
||||
ml("td", {}, (obj.boot_ver/100).toFixed(2))
|
||||
])
|
||||
])
|
||||
]);
|
||||
|
|
|
@ -546,12 +546,12 @@ class Web {
|
|||
for (uint8_t i = 0; i < 12; i++) {
|
||||
pin = request->arg(String(pinArgNames[i])).toInt();
|
||||
switch(i) {
|
||||
case 0: mConfig->nrf.pinCs = ((pin != 0xff) ? pin : DEF_CS_PIN); break;
|
||||
case 1: mConfig->nrf.pinCe = ((pin != 0xff) ? pin : DEF_CE_PIN); break;
|
||||
case 2: mConfig->nrf.pinIrq = ((pin != 0xff) ? pin : DEF_IRQ_PIN); break;
|
||||
case 3: mConfig->nrf.pinSclk = ((pin != 0xff) ? pin : DEF_SCLK_PIN); break;
|
||||
case 4: mConfig->nrf.pinMosi = ((pin != 0xff) ? pin : DEF_MOSI_PIN); break;
|
||||
case 5: mConfig->nrf.pinMiso = ((pin != 0xff) ? pin : DEF_MISO_PIN); break;
|
||||
case 0: mConfig->nrf.pinCs = ((pin != 0xff) ? pin : DEF_NRF_CS_PIN); break;
|
||||
case 1: mConfig->nrf.pinCe = ((pin != 0xff) ? pin : DEF_NRF_CE_PIN); break;
|
||||
case 2: mConfig->nrf.pinIrq = ((pin != 0xff) ? pin : DEF_NRF_IRQ_PIN); break;
|
||||
case 3: mConfig->nrf.pinSclk = ((pin != 0xff) ? pin : DEF_NRF_SCLK_PIN); break;
|
||||
case 4: mConfig->nrf.pinMosi = ((pin != 0xff) ? pin : DEF_NRF_MOSI_PIN); break;
|
||||
case 5: mConfig->nrf.pinMiso = ((pin != 0xff) ? pin : DEF_NRF_MISO_PIN); break;
|
||||
case 6: mConfig->led.led0 = pin; break;
|
||||
case 7: mConfig->led.led1 = pin; break;
|
||||
case 8: mConfig->led.led_high_active = pin; break; // this is not really a pin but a polarity, but handling it close to here makes sense
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue