moved data rate check in enable branch of set cmm

This commit is contained in:
2026-02-10 12:14:56 +01:00
parent 48b2619a13
commit c96d00f5e3

View File

@@ -290,11 +290,10 @@ where
}
pub async fn set_continuous_mode(&mut self, enable: bool) -> Result<(), Error<I::Error>> {
if enable {
if matches!(self.data_rate, DataRate::Unset) {
return Err(Error::NoDataRateSet);
}
if enable {
self.write_reg_controll_0(self.ctrl0 | Control0RegisterFlags::CMM_FRE_EN)
.await?;