Make serial compile, add github workflow

This commit is contained in:
Daniel 2024-02-20 21:24:32 +02:00
parent 2c4fd25943
commit 4cf741a32b
8 changed files with 37 additions and 22 deletions

View file

@ -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();

View file

@ -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

View file

@ -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

View file

@ -1,5 +1,3 @@
//SERIAL-LINK-TRANSMITTER-INVERTER.h
#ifndef SERIAL_LINK_TRANSMITTER_INVERTER_H
#define SERIAL_LINK_TRANSMITTER_INVERTER_H