Skip to content

Commit 0a43d1b

Browse files
committed
Clean comments
1 parent 9f00a4d commit 0a43d1b

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

Arduino_BHY2/src/BoschSensortec.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ void BoschSensortec::begin()
1616
auto ret = bhy2_init(BHY2_SPI_INTERFACE, bhy2_spi_read, bhy2_spi_write, bhy2_delay_us, MAX_READ_WRITE_LEN, NULL, &_bhy2);
1717
if (_debug) _debug->println(get_api_error(ret));
1818

19+
// Print bhi status
1920
uint8_t stat;
2021
ret = bhy2_get_boot_status(&stat, &_bhy2);
2122
if (_debug) {
2223
_debug->println(get_api_error(ret));
2324
_debug->print("Boot status: ");
2425
_debug->println(stat, HEX);
2526
}
26-
2727
ret = bhy2_get_host_interrupt_ctrl(&stat, &_bhy2);
2828
if (_debug) {
2929
_debug->println(get_api_error(ret));
@@ -44,6 +44,7 @@ void BoschSensortec::begin()
4444
ret = bhy2_get_and_process_fifo(_workBuffer, WORK_BUFFER_SIZE, &_bhy2);
4545
if (_debug) _debug->println(get_api_error(ret));
4646

47+
// All sensors' data are handled in the same generic way
4748
for (uint8_t i = 1; i < BHY2_SENSOR_ID_MAX; i++) {
4849
bhy2_register_fifo_parse_callback(i, BoschParser::parseData, NULL, &_bhy2);
4950
}
@@ -71,11 +72,7 @@ void BoschSensortec::addSensorData(const SensorDataPacket &sensorData)
7172
{
7273
// Overwrites oldest data when fifo is full
7374
_sensorQueue.push(sensorData);
74-
// TODO: handle the queue by storing it in flash if full
75-
//if (!_sensorQueue.full()) {
76-
//_sensorQueue.push(sensorData);
77-
//} else {
78-
//}
75+
// Alternative: handle the full queue by storing it in flash
7976
}
8077

8178
void BoschSensortec::update()

Arduino_BHY2/src/BoschSensortec.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ extern "C"
2121

2222
#define MAX_READ_WRITE_LEN 256
2323

24-
// This will use the BHY functions for configuring sensors and retrieving data
2524
class BoschSensortec {
2625
public:
2726
BoschSensortec();

0 commit comments

Comments
 (0)