Skip to content

Commit

Permalink
0.7.40
Browse files Browse the repository at this point in the history
* added default pins for opendtu-fusion-v1 board
* fixed hw version display in `live`
* removed development builds, renamed environments in `platform.ini`
  • Loading branch information
lumapu committed Aug 21, 2023
1 parent 8f0bbfc commit fd2fd20
Show file tree
Hide file tree
Showing 12 changed files with 141 additions and 150 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/compile_development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ jobs:
run: python convert.py

- name: Run PlatformIO
run: pio run -d src --environment esp8266-release --environment esp8266-release-prometheus --environment esp8285-release --environment esp32-wroom32-release --environment esp32-wroom32-release-prometheus --environment esp32-wroom32-ethernet-release --environment opendtufusionv1-release
run: pio run -d src --environment esp8266 --environment esp8266-prometheus --environment esp8285 --environment esp32-wroom32 --environment esp32-wroom32-prometheus --environment esp32-wroom32-ethernet --environment opendtufusionv1

- name: Copy boot_app0.bin
run: cp ~/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin src/.pio/build/opendtufusionv1-release/ota.bin
run: cp ~/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin src/.pio/build/opendtufusionv1/ota.bin

- name: Rename Binary files
id: rename-binary-files
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/compile_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ jobs:
run: python convert.py

- name: Run PlatformIO
run: pio run -d src --environment esp8266-release --environment esp8266-release-prometheus --environment esp8285-release --environment esp32-wroom32-release --environment esp32-wroom32-release-prometheus --environment esp32-wroom32-ethernet-release --environment opendtufusionv1-release
run: pio run -d src --environment esp8266 --environment esp8266-prometheus --environment esp8285 --environment esp32-wroom32 --environment esp32-wroom32-prometheus --environment esp32-wroom32-ethernet --environment opendtufusionv1

- name: Copy boot_app0.bin
run: cp ~/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin src/.pio/build/opendtufusionv1-release/ota.bin
run: cp ~/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin src/.pio/build/opendtufusionv1/ota.bin

- name: Rename Binary files
id: rename-binary-files
Expand Down
18 changes: 9 additions & 9 deletions scripts/getVersion.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,50 +54,50 @@ def readVersion(path, infile):
sha = os.getenv("SHA",default="sha")

versionout = version[:-1] + "_" + sha + "_esp8266.bin"
src = path + ".pio/build/esp8266-release/firmware.bin"
src = path + ".pio/build/esp8266/firmware.bin"
dst = path + "firmware/" + versionout
os.rename(src, dst)

versionout = version[:-1] + "_" + sha + "_esp8266_prometheus.bin"
src = path + ".pio/build/esp8266-release-prometheus/firmware.bin"
src = path + ".pio/build/esp8266-prometheus/firmware.bin"
dst = path + "firmware/" + versionout
os.rename(src, dst)

versionout = version[:-1] + "_" + sha + "_esp8285.bin"
src = path + ".pio/build/esp8285-release/firmware.bin"
src = path + ".pio/build/esp8285/firmware.bin"
dst = path + "firmware/" + versionout
os.rename(src, dst)
gzip_bin(dst, dst + ".gz")

versionout = version[:-1] + "_" + sha + "_esp32.bin"
src = path + ".pio/build/esp32-wroom32-release/firmware.bin"
src = path + ".pio/build/esp32-wroom32/firmware.bin"
dst = path + "firmware/" + versionout
os.rename(src, dst)

versionout = version[:-1] + "_" + sha + "_esp32_prometheus.bin"
src = path + ".pio/build/esp32-wroom32-release-prometheus/firmware.bin"
src = path + ".pio/build/esp32-wroom32-prometheus/firmware.bin"
dst = path + "firmware/" + versionout
os.rename(src, dst)

versionout = version[:-1] + "_" + sha + "_esp32_ethernet.bin"
src = path + ".pio/build/esp32-wroom32-ethernet-release/firmware.bin"
src = path + ".pio/build/esp32-wroom32-ethernet/firmware.bin"
dst = path + "firmware/" + versionout
os.rename(src, dst)

versionout = version[:-1] + "_" + sha + "_esp32s3.bin"
src = path + ".pio/build/opendtufusionv1-release/firmware.bin"
src = path + ".pio/build/opendtufusionv1/firmware.bin"
dst = path + "firmware/s3/" + versionout
os.rename(src, dst)

# other ESP32 bin files
src = path + ".pio/build/esp32-wroom32-release/"
src = path + ".pio/build/esp32-wroom32/"
dst = path + "firmware/"
os.rename(src + "bootloader.bin", dst + "bootloader.bin")
os.rename(src + "partitions.bin", dst + "partitions.bin")
genOtaBin(path + "firmware/")

# other ESP32S3 bin files
src = path + ".pio/build/opendtufusionv1-release/"
src = path + ".pio/build/opendtufusionv1/"
dst = path + "firmware/s3/"
os.rename(src + "bootloader.bin", dst + "bootloader.bin")
os.rename(src + "partitions.bin", dst + "partitions.bin")
Expand Down
5 changes: 5 additions & 0 deletions src/CHANGES.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
77 changes: 61 additions & 16 deletions src/config/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
#define __CONFIG_H__


// globally used
#define DEF_PIN_OFF 255


//-------------------------------------
// WIFI CONFIGURATION
//-------------------------------------
Expand Down Expand Up @@ -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

#define DEF_CMT_CSB 27
#define DEF_CMT_FCSB 26
#define DEF_CMT_IRQ 34
#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

#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)
Expand Down
31 changes: 15 additions & 16 deletions src/config/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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));

Expand Down Expand Up @@ -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;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
//-------------------------------------
#define VERSION_MAJOR 0
#define VERSION_MINOR 7
#define VERSION_PATCH 39
#define VERSION_PATCH 40

//-------------------------------------
typedef struct {
Expand Down
8 changes: 4 additions & 4 deletions src/hm/hmDefines.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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__*/
2 changes: 1 addition & 1 deletion src/hm/hmRadio.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Loading

0 comments on commit fd2fd20

Please sign in to comment.