Skip to content
Snippets Groups Projects
Commit dee7190b authored by Samuel Tardieu's avatar Samuel Tardieu
Browse files

Use sensible default values for k_i and k_d

parent 3aea844c
No related branches found
No related tags found
1 merge request!17Resolve "Set PID coefficients from Python"
Pipeline #98586 passed
......@@ -9,9 +9,9 @@ type PidUnit = Fixed<8>;
// Those coefficients are to be intepreted as `PidUnit` values.
// For example, if `PidUnit` is `Fixed<8>`, a value of 0x40 is
// in fact 0x40 ÷ (1 << 8) = 0.25.
pub static K_P: AtomicI32 = AtomicI32::new(0x40);
pub static K_I: AtomicI32 = AtomicI32::new(0);
pub static K_D: AtomicI32 = AtomicI32::new(0);
pub static K_P: AtomicI32 = AtomicI32::new(0x40); // 0.25
pub static K_I: AtomicI32 = AtomicI32::new(0x03); // 0.01171875
pub static K_D: AtomicI32 = AtomicI32::new(-0x01); // -0.00390625
static CONTROLLED_MODE: AtomicBool = AtomicBool::new(false);
static LEFT_SPEED: AtomicI16 = AtomicI16::new(0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment