2026-06-03 (3VO): Test Driven Development, Exercise#
Exercise: Logic Extension (Test Driven Development)#
Requirements To Implement#
The table below is a typical output of a requirements meeting (in
reality, feature descriptions that escape such meetings are not so
precise). For each entry, create a test suite in the form
test-<name>.cpp, and add that to the existing test program (see
CMakeLists.txt).
Name |
Description |
|---|---|
|
The current formula is rather dim: uint64_t duty_cycle = t/50 * 30*1000*1000;
It implicitly assumes the following:
What we want
|
|
There is no safeguard against temperature measurements that exceed the specified range. The effect of such a measurement would be to set the PWM duty cycle to an invalid value (the duty cycle cannot, by definition, be higher than a PWM pin’s period).
|
|
Much like |