mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-06 03:50:13 +02:00
Increase buffer, change so 7E4 is stopped until battery started
This commit is contained in:
parent
4caa4842ab
commit
bb6a0d7905
2 changed files with 119 additions and 118 deletions
|
@ -826,7 +826,6 @@ void receive_can_battery(CAN_frame rx_frame) {
|
|||
}
|
||||
|
||||
void send_can_battery() {
|
||||
if (startedUp) {
|
||||
unsigned long currentMillis = millis();
|
||||
|
||||
//Send 10ms CANFD message
|
||||
|
@ -1111,7 +1110,10 @@ void send_can_battery() {
|
|||
previousMillis500ms = currentMillis;
|
||||
|
||||
EGMP_7E4.data.u8[3] = KIA_7E4_COUNTER;
|
||||
|
||||
if (startedUp) {
|
||||
transmit_can(&EGMP_7E4, can_config.battery);
|
||||
}
|
||||
|
||||
KIA_7E4_COUNTER++;
|
||||
if (KIA_7E4_COUNTER > 0x0D) { // gets up to 0x010C before repeating
|
||||
|
@ -1133,7 +1135,6 @@ void send_can_battery() {
|
|||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void setup_battery(void) { // Performs one time setup at startup
|
||||
#ifdef DEBUG_VIA_USB
|
||||
|
|
|
@ -160,7 +160,7 @@ class ACAN2517FDSettings {
|
|||
//······················································································································
|
||||
|
||||
//--- Driver transmit buffer size
|
||||
public: uint16_t mDriverTransmitFIFOSize = 20 ; // >= 0
|
||||
public: uint16_t mDriverTransmitFIFOSize = 22 ; // >= 0
|
||||
|
||||
//--- Controller transmit FIFO size
|
||||
public: uint8_t mControllerTransmitFIFOSize = 1 ; // 1 ... 32
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue