improve comments in PID tuning

This commit is contained in:
David P Hilton
2018-11-09 07:45:06 -07:00
parent f4e2de4608
commit ad4569fc4b
2 changed files with 9 additions and 5 deletions

View File

@@ -16,7 +16,9 @@ history<uint16_t, oscillationPeriod> milliWattHistory = {{0}, 0, 0};
int32_t tempToMilliWatts(int32_t rawTemp, uint16_t mass, uint8_t rawC) {
// mass is in milliJ/*C, rawC is raw per degree C
// mass is in milliJ/*C, rawC is raw per degree C
// returns milliWatts needed to raise/lower a mass by rawTemp
// degrees in one cycle.
int32_t milliJoules = mass * rawTemp / rawC;
return milliJoules * hz;
}