define default settings
This commit is contained in:
parent
4750463f7b
commit
863977e20f
@ -21,14 +21,14 @@ typedef union {
|
|||||||
|
|
||||||
void MEM_init(){
|
void MEM_init(){
|
||||||
uint8_t check = MEM_read_1_byte(0x0);
|
uint8_t check = MEM_read_1_byte(0x0);
|
||||||
if(check != 0x42){
|
if(check != 0x2A){
|
||||||
KART_CST.CONTROL_STEERING_MODE = 0;
|
KART_CST.CONTROL_STEERING_MODE = 0;
|
||||||
KART_CST.CONTROL_ALIVE_TIME = 50;
|
KART_CST.CONTROL_ALIVE_TIME = 50;
|
||||||
KART_CST.CONTROL_SPEED_FACTOR = 0;
|
KART_CST.CONTROL_SPEED_FACTOR = 111111;
|
||||||
KART_CST.CONTROL_POWER_FACTOR = 10000;
|
KART_CST.CONTROL_POWER_FACTOR = 10000;
|
||||||
KART_CST.CONTROL_STEERING_FACTOR = 400000000;
|
KART_CST.CONTROL_STEERING_FACTOR = 400000000;
|
||||||
KART_CST.CONTROL_MAX_SPEED_FW = 500;
|
KART_CST.CONTROL_MAX_SPEED_FW = 50;
|
||||||
KART_CST.CONTROL_MAX_SPEED_BW = 250;
|
KART_CST.CONTROL_MAX_SPEED_BW = 25;
|
||||||
|
|
||||||
KART_CST.JOYSTICK_MODE = 0;
|
KART_CST.JOYSTICK_MODE = 0;
|
||||||
KART_CST.JOYSTICK_PARAM1 = 5;
|
KART_CST.JOYSTICK_PARAM1 = 5;
|
||||||
@ -39,7 +39,7 @@ void MEM_init(){
|
|||||||
|
|
||||||
KART_CST.DRIVE_SPEED_TIME = 20;
|
KART_CST.DRIVE_SPEED_TIME = 20;
|
||||||
KART_CST.DRIVE_STOP_TIME = 10;
|
KART_CST.DRIVE_STOP_TIME = 10;
|
||||||
KART_CST.DRIVE_ALIVE_TIME = 25;
|
KART_CST.DRIVE_ALIVE_TIME = 250;
|
||||||
|
|
||||||
KART_CST.STEERING_ALIVE_TIME = 100;
|
KART_CST.STEERING_ALIVE_TIME = 100;
|
||||||
|
|
||||||
@ -74,7 +74,7 @@ void MEM_init(){
|
|||||||
MEM_write_1_byte(MEMADD_BATTERY_ENERGY_TIME, KART_CST.BATTERY_ENERGY_TIME);
|
MEM_write_1_byte(MEMADD_BATTERY_ENERGY_TIME, KART_CST.BATTERY_ENERGY_TIME);
|
||||||
MEM_write_1_byte(MEMADD_BATTERY_ALIVE_TIME, KART_CST.BATTERY_ALIVE_TIME);
|
MEM_write_1_byte(MEMADD_BATTERY_ALIVE_TIME, KART_CST.BATTERY_ALIVE_TIME);
|
||||||
|
|
||||||
MEM_write_1_byte(0x0, 0x42);
|
MEM_write_1_byte(0x0, 0x2A);
|
||||||
} else {
|
} else {
|
||||||
KART_CST.CONTROL_STEERING_MODE = MEM_read_1_byte(MEMADD_CONTROL_STEERING_MODE);
|
KART_CST.CONTROL_STEERING_MODE = MEM_read_1_byte(MEMADD_CONTROL_STEERING_MODE);
|
||||||
KART_CST.CONTROL_ALIVE_TIME = MEM_read_1_byte(MEMADD_CONTROL_ALIVE_TIME);
|
KART_CST.CONTROL_ALIVE_TIME = MEM_read_1_byte(MEMADD_CONTROL_ALIVE_TIME);
|
||||||
|
Reference in New Issue
Block a user