diff --git a/firmware/src/dccd/dccd.cpp b/firmware/src/dccd/dccd.cpp index 89da6e6..997fc14 100644 --- a/firmware/src/dccd/dccd.cpp +++ b/firmware/src/dccd/dccd.cpp @@ -124,11 +124,16 @@ void dccd::DccdApp::process(void) this->brakes.cycle_mode(); this->nvmem.dynamic_cfg.brakes_mode = this->brakes.get_mode_int(); } - else + else if(this->user_force.pot_mode==0) { this->tps.cycle_mode(); this->nvmem.dynamic_cfg.tps_mode = this->tps.get_mode_int(); } + else + { + this->brakes.cycle_mode(); + this->nvmem.dynamic_cfg.brakes_mode = this->brakes.get_mode_int(); + } }; // Process user force diff --git a/firmware/src/dccd/handbrake.cpp b/firmware/src/dccd/handbrake.cpp index 9b7cce1..9ff5280 100644 --- a/firmware/src/dccd/handbrake.cpp +++ b/firmware/src/dccd/handbrake.cpp @@ -23,9 +23,9 @@ void dccd::Handbrake::init(dccd::DccdHw* dccd_hw) { this->hardware = dccd_hw; - this->latch_time_1 = 500; - this->latch_time_2 = 1000; - this->latch_time_3 = 2000; + this->latch_time_1 = 750; + this->latch_time_2 = 1500; + this->latch_time_3 = 3000; this->mode = LATCH0; this->is_new_mode = 0; diff --git a/firmware/src/main.cpp b/firmware/src/main.cpp index eff4540..7657eff 100644 --- a/firmware/src/main.cpp +++ b/firmware/src/main.cpp @@ -26,29 +26,29 @@ int main(void) // App default config def_cfg.user_btn_dbnc = 10; def_cfg.user_btn_repeat_time = 500; - def_cfg.pot_mode = 0; + def_cfg.pot_mode = 1; def_cfg.btn_step = 10; def_cfg.mode_btn_repeat_time = 700; def_cfg.tps_treshold_on = 65; def_cfg.tps_treshold_off = 55; def_cfg.tps_timeout = 0; - def_cfg.hbrake_latch_time_1 = 500; - def_cfg.hbrake_latch_time_2 = 1000; - def_cfg.hbrake_latch_time_3 = 2000; + def_cfg.hbrake_latch_time_1 = 750; + def_cfg.hbrake_latch_time_2 = 1500; + def_cfg.hbrake_latch_time_3 = 3000; def_cfg.hbrake_dbnc = 100; def_cfg.brakes_dbnc = 100; def_cfg.coil_lock_current = 4500; def_cfg.coil_ref_resistance = 1500; def_cfg.coil_out_max_resistance = 2000; def_cfg.coil_out_min_resistance = 1000; - def_cfg.coil_disable_protection = 0; + def_cfg.coil_disable_protection = 1; def_cfg.coil_cc_mode = 1; def_cfg.dsp_brigth_pwm = 40; def_cfg.dsp_dimm_pwm = 25; def_cfg.hbrake_force = -1; def_cfg.brakes_open_force = -1; def_cfg.brakes_lock_force = 100; - def_cfg.tps_enabled = 1; + def_cfg.tps_enabled = 0; def_cfg.tps_force_1 = 60; def_cfg.tps_force_2 = 80; def_cfg.tps_force_3 = 100; diff --git a/firmware/src/uDCCD.cppproj b/firmware/src/uDCCD.cppproj index 81e0c5f..cf24ab1 100644 --- a/firmware/src/uDCCD.cppproj +++ b/firmware/src/uDCCD.cppproj @@ -26,7 +26,7 @@ exception_table 2 0 - 1 + 0 @@ -46,16 +46,16 @@ - 249992 + 125000 - debugWIRE + ISP com.atmel.avrdbg.tool.atmelice J42700001490 Atmel-ICE - debugWIRE - 249992 + ISP + 125000