refactor(simu): use SDL & ImGui (#6233)
Co-authored-by: raphaelcoeffic <1050031+raphaelcoeffic@users.noreply.github.com> Co-authored-by: Malte Langermann <malte@langermann.net>
This commit is contained in:
co-authored by
raphaelcoeffic
Malte Langermann
parent
14287cb91d
commit
4eddda034d
@@ -22,11 +22,12 @@
|
||||
#include "hal/switch_driver.h"
|
||||
#include "definitions.h"
|
||||
#include "myeeprom.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#include "switches.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
struct hw_switch_def {
|
||||
const char* name;
|
||||
SwitchHwType type;
|
||||
@@ -34,7 +35,7 @@ struct hw_switch_def {
|
||||
|
||||
#include "simu_switches.inc"
|
||||
|
||||
int8_t switchesStates[MAX_SWITCHES] = { -1 };
|
||||
int8_t switchesStates[MAX_SWITCHES] = { 0 };
|
||||
|
||||
void simuSetSwitch(uint8_t swtch, int8_t state)
|
||||
{
|
||||
@@ -42,7 +43,9 @@ void simuSetSwitch(uint8_t swtch, int8_t state)
|
||||
switchesStates[swtch] = state;
|
||||
}
|
||||
|
||||
void boardInitSwitches() {}
|
||||
void boardInitSwitches() {
|
||||
memset(switchesStates, -1, sizeof(switchesStates));
|
||||
}
|
||||
|
||||
static uint8_t get_switch_index(uint8_t cat, uint8_t idx)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user