You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following from #34/#62 and #37/#47, we used nb::block to acquire readings from the ADS1015 units used in LimCurrent and LimTemperature (which we'll have two of). This is because the ADS measurement takes three steps:
Set the channel configuration and start the measurement
Wait for the unit to report the conversion is complete
Read the result of the conversion register
However, the blocking macro will require the FSM to wait for measurements sequentially from all three units which may take a notable amount of time. In practice, we would want to measure the three units concurrently to avoid busy waiting.
Implement an async version of the blocking macro to allow other tasks to run while waiting for ADS measurement
Await a small amount of async sleep in between loops
Use this macro instead of nb::block in LimTemperature::read_lim_temps and LimCurrent::read_currents
Include a synchronization primitive (e.g. tokio::sync::Mutex) to prevent more than one pin measurement (of a single unit) from running at the same time
The text was updated successfully, but these errors were encountered:
Following from #34/#62 and #37/#47, we used
nb::block
to acquire readings from the ADS1015 units used inLimCurrent
andLimTemperature
(which we'll have two of). This is because the ADS measurement takes three steps:However, the blocking macro will require the FSM to wait for measurements sequentially from all three units which may take a notable amount of time. In practice, we would want to measure the three units concurrently to avoid busy waiting.
nb::block
inLimTemperature::read_lim_temps
andLimCurrent::read_currents
tokio::sync::Mutex
) to prevent more than one pin measurement (of a single unit) from running at the same timeThe text was updated successfully, but these errors were encountered: