|
|
@ -78,23 +78,23 @@ bool encoder_read_with_encoder(encoder_usage_t encoder, uint32_t *encoder_value) |
|
|
|
|
|
|
|
void encoder_light_schedule(void) |
|
|
|
{ |
|
|
|
if (camera_encoder_state == STANDBY) |
|
|
|
{ |
|
|
|
if (sys_haspassedms(camera_encoder_lastprocess) > 500) |
|
|
|
{ |
|
|
|
camera_encoder_lastprocess = HAL_GetTick(); |
|
|
|
encoder_switch_toggle_on_off_state(CAMERA_ENCODER); |
|
|
|
} |
|
|
|
} |
|
|
|
// if (camera_encoder_state == STANDBY) |
|
|
|
// { |
|
|
|
// if (sys_haspassedms(camera_encoder_lastprocess) > 500) |
|
|
|
// { |
|
|
|
// camera_encoder_lastprocess = HAL_GetTick(); |
|
|
|
// encoder_switch_toggle_on_off_state(CAMERA_ENCODER); |
|
|
|
// } |
|
|
|
// } |
|
|
|
|
|
|
|
if (driven_encoder_gear_state == STANDBY) |
|
|
|
{ |
|
|
|
if (sys_haspassedms(driven_encoder_gear_lastprocess) > 500) |
|
|
|
{ |
|
|
|
driven_encoder_gear_lastprocess = HAL_GetTick(); |
|
|
|
encoder_switch_toggle_on_off_state(DRIVEN_ENCODER_GEAR); |
|
|
|
} |
|
|
|
} |
|
|
|
// if (driven_encoder_gear_state == STANDBY) |
|
|
|
// { |
|
|
|
// if (sys_haspassedms(driven_encoder_gear_lastprocess) > 500) |
|
|
|
// { |
|
|
|
// driven_encoder_gear_lastprocess = HAL_GetTick(); |
|
|
|
// encoder_switch_toggle_on_off_state(DRIVEN_ENCODER_GEAR); |
|
|
|
// } |
|
|
|
// } |
|
|
|
} |
|
|
|
|
|
|
|
void encoder_set_state(encoder_usage_t encoder, encoder_light_state_t state) |
|
|
|