File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
micropython/modules/breakout_scd41 Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -69,15 +69,15 @@ mp_obj_t scd41_get_data_ready() {
69
69
mp_raise_msg (&mp_type_RuntimeError, NOT_INITIALISED_MSG);
70
70
return mp_const_none;
71
71
}
72
- uint16_t data_ready = 0 ;
73
- int error = scd4x_get_data_ready_status (&data_ready);
72
+ bool data_ready = false ;
73
+ int error = scd4x_get_data_ready_flag (&data_ready);
74
74
if (error) {
75
75
mp_raise_msg (&mp_type_RuntimeError, READ_FAIL_MSG);
76
76
return mp_const_none;
77
77
}
78
78
// The datasheet doesn't really say *which* bit might be 1 if data is ready...
79
79
// so check if the least significant eleven bits are != 0
80
- return ( data_ready & 0x7ff ) ? mp_const_true : mp_const_false;
80
+ return data_ready ? mp_const_true : mp_const_false;
81
81
}
82
82
83
83
mp_obj_t scd41_set_temperature_offset (mp_obj_t offset) {
You can’t perform that action at this time.
0 commit comments