cli / eeprom implementation tested and verified

This commit is contained in:
Lennart Eriksson 2016-10-17 09:05:34 +02:00
parent 679040f9e7
commit d5dcbf9c25
2 changed files with 4 additions and 6 deletions

View File

@ -241,15 +241,12 @@ typedef enum
//ACCEL
COMMAND_ID_PID_ACCEL_P_ROLL,
COMMAND_ID_PID_ACCEL_P_PITCH,
COMMAND_ID_PID_ACCEL_P_YAW,
COMMAND_ID_PID_ACCEL_I_ROLL,
COMMAND_ID_PID_ACCEL_I_PITCH,
COMMAND_ID_PID_ACCEL_I_YAW,
COMMAND_ID_PID_ACCEL_D_ROLL,
COMMAND_ID_PID_ACCEL_D_PITCH,
COMMAND_ID_PID_ACCEL_D_YAW,
/* Counter for the amount of commands */
COMMAND_ID_COUNT,

View File

@ -45,19 +45,20 @@ void init_system()
//Configure the clock
system_clock_config();
pidInit();
/* read saved variables from eeprom, in most cases eeprom should be read after a lot of the initializes */
readEEPROM();
//initialize the CLI NOTE: Cant use the same usart as anything else or there will be some big trouble
cliInit(USART3);
cliInit(USART1);
//init sbus, using USART1
sbus_init();
// sbus_init();
//init motors to run with oneshot 125
pwmEnableAllMotors(Oneshot125);
pidInit();
#ifdef USE_LEDS
//Initialize the on board leds