rearragned some code

This commit is contained in:
2024-01-11 21:19:31 +01:00
parent 0aae5a742c
commit ed6f4e488a
5 changed files with 96 additions and 74 deletions

32
Software/src/common.cpp Normal file
View File

@@ -0,0 +1,32 @@
#include "common.h"
// String representation of SpeedSource enum
const char *SpeedSourceString[] = {
#ifdef FEATURE_ENABLE_TIMER
"Timer",
#endif
"Impuls",
"GPS",
"CAN-Bus"
};
const size_t SpeedSourceString_Elements = sizeof(SpeedSourceString) / sizeof(SpeedSourceString[0]);
// String representation of GPSBaudRate enum
const char *GPSBaudRateString[] = {
"4800",
"9600",
"19200",
"38400",
"57600",
"115200"
};
const size_t GPSBaudRateString_Elements = sizeof(GPSBaudRateString) / sizeof(GPSBaudRateString[0]);
// String representation of CANSource enum
const char *CANSourceString[] = {
"KTM 890 Adventure R (2021)",
"KTM 1290 Superduke R (2023)"};
const size_t CANSourceString_Elements = sizeof(CANSourceString) / sizeof(CANSourceString[0]);

View File

@@ -8,6 +8,7 @@
#include "config.h"
#include "debugger.h"
#include "globals.h"
// Instance of I2C_eeprom for EEPROM access
I2C_eeprom ee(0x50, EEPROM_SIZE_BYTES);