add missing PID update

This commit is contained in:
Sebastien Bourdeauducq 2017-05-17 00:08:02 +08:00
parent 5f90960ce1
commit ebc341f28c
1 changed files with 1 additions and 0 deletions

View File

@ -102,6 +102,7 @@ impl Controller {
pub fn set_emission_target(&mut self, amperes: f32) {
self.fbi_target = amperes;
self.fbi_pid.set_target(amperes);
self.fbi_range = board::EmissionRange::Low;
if amperes > 120e-6 {
self.fbi_range = board::EmissionRange::Med;