take start pos into account for set_volume
This commit is contained in:
parent
c3516f5285
commit
1f9f56c2fd
@ -40,7 +40,7 @@ static void back_button_handler(lv_event_t * e){
|
|||||||
if(c_pse_unit->pL_per_step == 0) return; // TODO: alert popup
|
if(c_pse_unit->pL_per_step == 0) return; // TODO: alert popup
|
||||||
if(c_pse_unit->flow == 0) return;
|
if(c_pse_unit->flow == 0) return;
|
||||||
c_pse_unit->stepper_status->stop_at_limit = 1;
|
c_pse_unit->stepper_status->stop_at_limit = 1;
|
||||||
c_pse_unit->stepper_status->stop_steps = (uint64_t)1000000 * c_pse_unit->set_volume / c_pse_unit->pL_per_step;
|
c_pse_unit->stepper_status->stop_steps = c_pse_unit->start_pos + (uint64_t)1000000 * c_pse_unit->set_volume / c_pse_unit->pL_per_step;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
c_pse_unit->stepper_status->stop_at_limit = 0;
|
c_pse_unit->stepper_status->stop_at_limit = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user