Commit Graph

458 Commits

Author SHA1 Message Date
mumpf
4b8b951be8
FIX issue introduced with #194 (#201)
- if go handler writes to same go, value is not sent to bus anymore

Co-authored-by: Waldemar Porscha <waldemar.porscha@sap.com>
2022-04-25 11:18:57 +02:00
Simon Billemont
29702f69c3
Fix #191 by initializing the platform pointer in all KnxFacade constructors (#198)
* Fix #191 by initializing the platform pointer in all KnxFacade constructors

* Revert "Fix #191 by initializing the platform pointer in all KnxFacade constructors"

This reverts commit adc05cfaf7.

* Alternative fix for #191 by initializing the platform pointer in KnxFacade(&bau) from the platform stored in bau
2022-04-19 09:51:36 +02:00
Simon Billemont
01979174e3
Fixed accedental swap of size parameter and KNX_FLASH_SIZE define introduced in PR #196 (#197) 2022-04-16 22:16:02 +02:00
Simon Billemont
b0153de97f
Fix issue with Esp8266/Esp32 platform reinitializing EEPROM multiple times causing it to forget staged EEPROM changes (#196) 2022-04-13 09:19:18 +02:00
mumpf
9c620a013d
GroupObjects can communicate internally (#194)
* GroupObjects can communicate internally
- GroupObjects use callback infrastructure also during write to bus
- external and internal write of a GO can be handled identically
- needs #define INTERNAL_GROUPOBJECT

* FIX-Works now also if SMALL_GROUPOBJECT is not set

* Remove #ifdef INTERNAL_GROUPOBJECT

Co-authored-by: Waldemar Porscha <waldemar.porscha@sap.com>
2022-04-12 00:28:21 +02:00
mumpf
2453c3ce5d
Forgotten init for PR #187 (#195)
Co-authored-by: Waldemar Porscha <waldemar.porscha@sap.com>
2022-04-06 21:36:36 +02:00
mumpf
22af8267c3
Openknx version support (#190)
* Feature: Allow additional version check on startup
- added versionCheckCallback
- added apiVersion to DeviceObject
- added new versionCheck to memory,cpp

* updated source code formatting

* changes for PR
- (old) version is again part of version check
- naming conventions

* forgotten parameter in callback

* correct wrong buffer initialization

* version <-> apiVersion swapped

Co-authored-by: Waldemar Porscha <waldemar.porscha@sap.com>
2022-03-02 13:38:30 +01:00
mumpf
a10fa20bde
Feature: additional callbacks for application (#189)
* Feature: additional callbacks for application
- beforeRestart callback
- beforeTablesUnload callback

* naming conventions for PR

Co-authored-by: Waldemar Porscha <waldemar.porscha@sap.com>
2022-03-01 21:42:03 +01:00
mptei
145c354110
Removed unneded TX_WAIT_ECHO state; fixed echo detection (#188) 2022-03-01 17:30:54 +01:00
mumpf
4f17ed4b5d
Feature: Uninitialized GO handling (#187)
- don't send senseless values on GroupValueRead

Co-authored-by: Waldemar Porscha <waldemar.porscha@sap.com>
2022-03-01 17:28:11 +01:00
mptei
f4d7f604be
Handling buffer overrun (#184) 2022-02-26 22:41:23 +01:00
SirSydom
1f079147c0
solves #183 (#185)
get the unique id directly from flash instead using the async. SDK call.
2022-02-26 22:40:17 +01:00
mumpf
c47a8b06c8
- Get rid of EEPROM emulation (#186)
- Use SAMD-Flash without copying parameters to RAM

Co-authored-by: Waldemar Porscha <waldemar.porscha@sap.com>
2022-02-26 22:39:21 +01:00
mptei
9c48027d3c
Using defines in ACK handling (#182)
* Using defines in ACK handling

* added newline
2022-02-24 21:23:57 +01:00
SirSydom
d27f420217
solves #178 bugfix when sending frames > 63 byte, missing masking of … (#179)
* solves #178 bugfix when sending frames > 63 byte, missing masking of upper bits after sending a U_DataOffset

* also masked U_L_DATA_END_REQ correctly

* used bit masking instead of %
2022-02-24 10:13:02 +01:00
SirSydom
a306174878
Branch flash pr with large eeprom (#177)
* save WIP on flash api + header reorder

* reduce diffs to master

* added support for RP2040 (Raspberry Pi Pico)

* support DPT9.009 (airflow) and DPT9.029 (absolute humidity)

* added support for RP2040 (Raspberry Pi Pico) (#145)

* worked on flash implementation

* worked on flash implementation

* added malloc for _EraseBlockBuffer, fixed some bugs

* fixed memoryread and crash while loading KOs (+debugstuff)

* some fixes and debugs

* align to pagesize

* clean up debug stuff, comments ...

* added support for both Eeprom and Flash (NvMemoryType) plattforms.

* changed memoryReadIndicationP to memoryReadIndication
added stdlib and defines

* fixed std::min

* another try for fixing the min problem

* rolled back linux plattform to eeprom

* comments only, hints for plattforms

* bugfix when calculating memorywrites over multiple blocks by mumpf

* added support for EEPROM-Emulation / RAM-buffered Flash
improvements in RP2040 plattform

* fixed typo in KNX_FLASH_OFFSET

* - writebuffersize clarified (PR discussion)
- changed alignment from flashpagesize to 32bit
- added override modifier (PR discussion)
- changed comment regarding flash/eeprom functions for plattforms to override/implement (PR discussion)

* resolved CodeFactor issue

Co-authored-by: Thomas Kunze <thomas.kunze@gmx.com>
2022-02-22 14:24:36 +01:00
Michael Geramb
53425e2ef7
Add callback functions for prog mode and improve documentation (#173) 2022-02-19 20:23:50 +01:00
thelsing
d26771c432
Merge pull request #171 from mptei/tx_throttle_rx_wait_addr
More tpuart fixes
2022-02-13 21:56:03 +01:00
SirSydom
2c2d69a396
Rp2040 plattform newcore (#172)
* added support for RP2040 (Raspberry Pi Pico)

* support DPT9.009 (airflow) and DPT9.029 (absolute humidity)

* adapted to work with the latest arduino-pico core V1.11.0
- setPollingMode for knxSerial
2022-02-13 21:54:38 +01:00
Mike Pieper
408cd2bbeb printHex takes to long 2022-02-13 11:22:02 +01:00
Mike Pieper
c908d5dc0a handle all available bytes 2022-02-06 14:13:48 +01:00
Mike Pieper
7d7e6eb3b4 New state RX_L_ADDR; loop load adaption 2022-02-06 07:55:34 +01:00
Mike Pieper
1ee4377e61 tx throttle. 2022-01-22 15:20:27 +01:00
mptei
6720f86e5c
Changed color byte order from WRGB to RGBW (R MSB). (#168) 2022-01-19 14:51:00 +01:00
dev-git-usr
36e0a00e80
Added Datapointtype DPT 7.600 (colortemperature) (#165)
* Added Datapointtype DPT 7.600 (colortemperature)

* Added Decoding of Datatype
2022-01-16 18:56:00 +01:00
mptei
71e8607f43
Added support for DPT 251.600 RGBW (#167)
* Added support for DPT 251.600 RGBW

* style fix
2022-01-16 18:26:51 +01:00
mptei
f5feefb0f2
TPUART: Avoid false EOP (#166)
* Made the rx loop shorter to avoid tx buffer saturation.

* sendSingleFrameByte return false on last byte

* sendSingleFrameByte return false on last byte
2022-01-16 18:25:32 +01:00
croghostrider
bf70e162f8
fix constant comparison (#162)
* fix constant comparison

* .
2021-12-29 17:20:46 +01:00
mptei
12d0ea1ad8
Use full duplex in tpuart_data_link_layer. (#161)
* TPUART full duplex handling

* Stay in loop when RX_L_DATA.
2021-12-28 19:53:48 +01:00
Domos
fb74931bec
Add 2 new methods: paramSignedByte and paramBit. Comments and usage inside code (#159) 2021-12-23 20:04:34 +01:00
mptei
eb7ae16dde
Returning correct value for ULongType. (#157) 2021-12-22 20:00:27 +01:00
mptei
63ff2c5d4d
Removed doubled code (#158) 2021-12-22 19:59:55 +01:00
Sonnengruesser
87edd3dfe0
Fix callback sequence (#153)
Save-/restore callbacks need to be defined before knx.readMemory() to ensure the restore callback is called.
2021-12-13 11:17:36 +01:00
rueckix
616599cf8b
Fix EEPROM include on STM32 (#151)
The structure of the stm32 arduino core changed (https://github.com/stm32duino/Arduino_Core_STM32/tree/main/libraries/EEPROM/src).
stm32_eeprom.h was moved to a subfolder. Instead, we can now include (and potentially use later), the `EEPROM.h` header.
2021-10-17 18:19:45 +02:00
SirSydom
57b1950e38
support DPT9.009 (airflow) and DPT9.029 (absolute humidity) (#149)
* added support for RP2040 (Raspberry Pi Pico)

* support DPT9.009 (airflow) and DPT9.029 (absolute humidity)
2021-09-22 23:51:21 +02:00
SirSydom
4f6c837b78
added support for RP2040 (Raspberry Pi Pico) (#145) 2021-07-08 19:45:33 +02:00
croghostrider
6254fc9b67
fix bulid (#143)
fix bulid


fix bulid


fix bulid
2021-06-14 08:10:48 +02:00
croghostrider
31e35695e6
fix wrong IP (#142) 2021-06-08 20:27:33 +02:00
croghostrider
59d1b67d6c
add KNX IP discovery support (#141)
for ESP8266 and ESP32
2021-06-04 17:23:23 +02:00
croghostrider
2450c1c458
fix ESP32 IP KNX Demo (#139) 2021-06-02 17:55:07 +02:00
croghostrider
14462d410d
Change individual address (#140)
to 15.15.255
2021-06-02 17:53:46 +02:00
etrinh
75c863bffe
Add new KNX_NO_STRTOx_CONVERSION define for footprint reduction (#137)
* Remove uniqueSerialNumber debug log to reduce footprint

* add KNX_NO_STRTOx_CONVERSION to avoid expensive strtod conversion
2021-05-12 13:03:10 +02:00
OutOfSync1
ed54da7089
fix some typos (#136)
* removed one section that was duplicate in dptconvert.cpp
2021-05-04 16:19:29 +02:00
OutOfSync1
95cf9df7fc
fix userdata saverestore (#133) (#135)
* set saveSize at compile time

* make sure USERDATA_SAVE_SIZE is set to valid value
2021-05-04 16:17:27 +02:00
etrinh
a4e74ebae5
Remove uniqueSerialNumber debug log to reduce footprint (#134) 2021-04-17 11:12:19 +02:00
OutOfSync1
14162fb1a4
fix userdata saverestore (#133)
* * fix for save/restore of userdata

* change declaration of restore() in knx_facade.h to "const uint8_t* restore(const uint8_t* buffer)" to avoid calling default implementation in save_restore.h

* change typedefs to separate SaveCallback and RestoreCallback

* fix BME60 example, knx.setRestoreCallback() needs to use const uint8_t* as well

* fix commitToEeprom for ESP32

* trigger dirty flag for ESP32 to make sure data is committed
2021-04-14 23:46:03 +02:00
OutOfSync1
1343ed0b7d
fixes to enable partial programming (#132)
* fixes to enable partial programming (thanks to mumpf and proggerKA at KNX-UF!)

* add PID_MCB_TABLE to TableObject

* add CallBackProperty to send PID_MCB_TABLE

* calculate crc checksum using Crc16Citt when state switches to LOAD_COMPLETED

* add crc to save(), restore() and saveSize() to save crc to flash

* add CallBackProperty for read and write of PID_PROG_VERSION to ApplicationProgramObject

* create overrides for save, restore, and saveSize in ApplicationProgramObject to save _programVersion to flash

* improve crc calculation

* removed TableObject::crc16Citt method and use the one in bits.h

* do not save crc in flash, instead calculate on-the-fly in CallbackProperty when state==LS_LOADED

* use DataProperty to store PID_PROG_VERSION

* WARNING: segmentSize calculation for crc calculation is currently not correct. Need to somehow access size of data in class that inherits from TableObject (e.g. ApplicationObject or RouterObject)

* fix segment size in TableObject()

* save size after TableObject::allocTable() is called. Also change save() and restore() to save _size to flash. Modify saveSize()

* use _size to calculate crc value in CallbackProperty

* reduce footprint, save 5 byte

* add comment why _size field is needed

* remove PID_MCB_TABLE from RouterObject

* this is now implemented in TableObject
2021-04-14 23:44:12 +02:00
OutOfSync1
e57bbf9dbe
generate unique serial number (#90) (#131)
* generate unique serial number (#90)

* see https://github.com/ricaun/ArduinoUniqueID

* calculated from ESP.getEfuseMac() on ESP32

* ESP.getChipId() on ESP8266

* SERIAL_NUMBER_WORD_0-3 on SAMD

* HAL_GetUIDw0-2() on STM32

* defaults to 0x01020304 on other platforms

* fix variable name for ESP platform

* another fix variable name for ESP platform (need more coffee...)
2021-04-12 11:40:56 +02:00
etrinh
036bd54c79
Tweak for Ram usage (#129)
* Add KNX_NO_DEFAULT_UART to avoid default uart assignation for ArduinoPlatforms and derivatives, with associated defines (HWSERIAL_NONE for stm32) to recover RAM from unused RX/TX buffers
Remove ArduinoPlatform(HardwareSerial* knxSerial) constructor, seems not useable by KnxFacade

* Restore ArduinoPlatform::ArduinoPlatform(HardwareSerial* knxSerial) constructor

* revert xxxPlatform(HardwareSerial* s) constructors
2021-04-01 09:34:26 +02:00
etrinh
446ea1b9aa
Fix int32 -> KNXValue conversion (#128)
Add KNX_NO_SPI to reduce footprint
2021-03-11 20:31:09 +01:00