mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-04 10:19:29 +02:00
Increaes element size to 50k
This commit is contained in:
parent
92d8850261
commit
fda922105b
2 changed files with 7 additions and 2 deletions
|
@ -2,7 +2,7 @@
|
||||||
#define MODBUS_LUNA2000_H
|
#define MODBUS_LUNA2000_H
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
|
|
||||||
#define MB_RTU_NUM_VALUES 30000
|
#define MB_RTU_NUM_VALUES 50000
|
||||||
// Definitions for BMS status
|
// Definitions for BMS status
|
||||||
#define STANDBY 0
|
#define STANDBY 0
|
||||||
#define INACTIVE 1
|
#define INACTIVE 1
|
||||||
|
|
|
@ -32,8 +32,13 @@ unsigned long previousMillis10ms = 50;
|
||||||
unsigned long previousMillisInverter = 0;
|
unsigned long previousMillisInverter = 0;
|
||||||
|
|
||||||
//ModbusRTU parameters
|
//ModbusRTU parameters
|
||||||
#if defined(MODBUS_BYD) || defined(MODBUS_LUNA2000)
|
#if defined(MODBUS_BYD)
|
||||||
#define MB_RTU_NUM_VALUES 30000
|
#define MB_RTU_NUM_VALUES 30000
|
||||||
|
#endif
|
||||||
|
#if defined(MODBUS_LUNA2000)
|
||||||
|
#define MB_RTU_NUM_VALUES 50000
|
||||||
|
#endif
|
||||||
|
#if defined(MODBUS_BYD) || defined(MODBUS_LUNA2000)
|
||||||
uint16_t mbPV[MB_RTU_NUM_VALUES]; // process variable memory
|
uint16_t mbPV[MB_RTU_NUM_VALUES]; // process variable memory
|
||||||
// Create a ModbusRTU server instance listening on Serial2 with 2000ms timeout
|
// Create a ModbusRTU server instance listening on Serial2 with 2000ms timeout
|
||||||
ModbusServerRTU MBserver(Serial2, 2000);
|
ModbusServerRTU MBserver(Serial2, 2000);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue