Robert

Results 34 comments of Robert

That was definitely a bug. I commited a [quick fix](https://github.com/Traumflug/Teacup_Firmware/commit/acd5002f1ac5070b8bccaf8d0cd8c7d4fea96550) to my branch. Now temperature control is perfect!

That depends on whether my solution is good enough, and what more needs to be done. You're the best person do decide that, since I'm only beginning to know the...

> Best decisions are based on evidence, performance measurements, code size, such stuff. And by no means I'm an expert in every detail of this firmware. In general, I agree,...

Good idea moving heater and temp. residency ticks to clocks! No need for additional counters that way :) I just created [another branch](https://github.com/Traumflug/Teacup_Firmware/tree/heaters_intervals). Already pushed the changes you proposed. Next,...

Not that much new code - just a [few lines](https://github.com/Traumflug/Teacup_Firmware/compare/experimental...heaters_intervals). As to why temp_sensor_tick() should be called on a different interval than heater_tick() I see a couple of reasons: -...

Well, if EWMA was disabled (TEMP_EWMA = 1), then [the code](https://github.com/Traumflug/Teacup_Firmware/blob/heaters_intervals/temp.c#L371-L381) would simplify to `temp_sensors_runtime[i].last_read_temp = (uint16_t) temp;` Right now, EWMA is the only use at all for readings other...

Ok, to sum up... 1. EWMA is optional, but if enabled, then you actually need frequent sensor sampling. 2. If disabled, then it's preferrable to read the sensors with the...

1. Should be easy to convert `analog_read()` to async mode. Could change it so that `analog_read_begin()` starts an ADC read, and the ADC ISR stops after the read, i.e. doesn't...

Guys, I messed up. I accidentally force-pushed not only my heaters_intervals branch, but also master and experimental, which were out of date... @Traumflug, I think if you force-push them from...

Thanks! And sorry for the trouble. Just pushed a bunch of commits to [my branch](https://github.com/Traumflug/Teacup_Firmware/tree/heaters_intervals). Heater control runs on the 250ms clock. Sensor update frequency depends on EWMA being enabled....