mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-05 02:39:57 +02:00
Make serial compile, add github workflow
This commit is contained in:
parent
2c4fd25943
commit
4cf741a32b
8 changed files with 37 additions and 22 deletions
|
@ -47,7 +47,12 @@
|
|||
#include "SERIAL-LINK-RECEIVER-FROM-BATTERY.h" //See this file for more Serial-battery settings
|
||||
#endif
|
||||
|
||||
#ifndef SERIAL_LINK_RECEIVER // The serial thing does its thing
|
||||
#ifdef SERIAL_LINK_RECEIVER // The serial thing does its thing
|
||||
void update_values_battery();
|
||||
void receive_can_battery();
|
||||
void send_can_battery();
|
||||
void setup_battery(void);
|
||||
#else
|
||||
void update_values_battery();
|
||||
void receive_can_battery(CAN_frame_t rx_frame);
|
||||
void send_can_battery();
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// SERIAL-LINK-RECEIVER-FROM-BATTERY.cpp
|
||||
|
||||
#include "SERIAL-LINK-RECEIVER-FROM-BATTERY.h"
|
||||
#include "BATTERIES.h"
|
||||
#ifdef SERIAL_LINK_RECEIVER
|
||||
#include <Arduino.h>
|
||||
#include "../devboard/utils/events.h"
|
||||
#include "SERIAL-LINK-RECEIVER-FROM-BATTERY.h"
|
||||
|
||||
#define INVERTER_SEND_NUM_VARIABLES 1
|
||||
#define INVERTER_RECV_NUM_VARIABLES 16
|
||||
|
@ -212,3 +212,11 @@ void update_values_serial_link() {
|
|||
|
||||
Serial.println("");
|
||||
}
|
||||
|
||||
void setup_battery(void) {
|
||||
Serial.println("SERIAL_DATA_LINK_RECEIVER selected");
|
||||
}
|
||||
void update_values_battery() {}
|
||||
void send_can_battery() {}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#ifndef SERIAL_LINK_RECEIVER_FROM_BATTERY_H
|
||||
#define SERIAL_LINK_RECEIVER_FROM_BATTERY_H
|
||||
|
||||
#define BATTERY_SELECTED
|
||||
|
||||
#include <Arduino.h>
|
||||
#include "../../USER_SETTINGS.h"
|
||||
#include "../devboard/config.h" // Needed for all defines
|
||||
|
@ -35,5 +37,6 @@ extern bool inverterAllowsContactorClosing; //Bool, 1=true, 0=false
|
|||
|
||||
void manageSerialLinkReceiver();
|
||||
void update_values_serial_link();
|
||||
void setup_battery(void);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
//SERIAL-LINK-TRANSMITTER-INVERTER.h
|
||||
|
||||
#ifndef SERIAL_LINK_TRANSMITTER_INVERTER_H
|
||||
#define SERIAL_LINK_TRANSMITTER_INVERTER_H
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue