Базово всё запущено. Датчики считываются записываются в модбас регистры, и по запросу выдаются.

Есть запас на 27-30 датчиков
This commit is contained in:
2025-03-03 16:49:25 +03:00
parent b96e00b166
commit 324c26e559
15 changed files with 191 additions and 176 deletions

View File

@@ -8,10 +8,6 @@ uint32_t CRC_ref;
//uint16_t CRC_ref;
// left this global for debug
uint8_t uchCRCHi = 0xFF;
uint8_t uchCRCLo = 0xFF;
unsigned uIndex;
/*Table of CRC values for high order byte*/
const unsigned char auchCRCHi[]=
@@ -55,8 +51,9 @@ const char auchCRCLo[] =
};
uint16_t crc16(uint8_t *data, uint32_t data_size)
{
uchCRCHi = 0xFF;
uchCRCLo = 0xFF;
uint8_t uchCRCHi = 0xFF;
uint8_t uchCRCLo = 0xFF;
unsigned uIndex;
/* CRC Generation Function */
while( data_size--) /* pass through message buffer */
{