@@ -135,26 +135,6 @@ void setup() {
135135 }
136136 }
137137
138- #if 0 // header stuff
139- // build csv header
140- String header = "Header,Millis,";
141- for (int i = 0; i < sensors_len; i++) {
142- if (sensors_verify[i]) {
143- header += sensors[i]->getSensorCSVHeader();
144- }
145- }
146- log_data(header);
147-
148- // store header
149- // storeData(header);
150- #if FLASH_SPI1 == 0
151- flash_storage.store(header);
152- #endif
153-
154- // send header to core1
155- queue_add_blocking(&qt, header.c_str());
156- #endif
157-
158138 pinMode (ON_BOARD_LED_PIN, OUTPUT);
159139 log_core (" Setup done." );
160140}
@@ -200,21 +180,14 @@ void loop() {
200180 // for (int i = 0; i < QT_ENTRY_SIZE; i++) packet[i] = 0; // useful for
201181 // debugging
202182 uint16_t packet_len = readSensorDataPacket (packet);
203- #if STORING_PACKETS == false
204- String csv_row = decodePacket (packet);
205- #endif
206183
207184 // print csv row
208185 // log_data(csv_row);
209186 log_data_raw (packet, packet_len);
210187
211188// send data to core1
212- #if STORING_PACKETS
213189 // queue_add_blocking(&qt, packet);
214190 queue_try_add (&qt, packet);
215- #else
216- queue_add_blocking (&qt, csv_row.c_str ());
217- #endif
218191
219192 delay (500 ); // remove before flight
220193 }
@@ -308,42 +281,6 @@ void handleCommand() {
308281 setCmdData (cmd_data);
309282}
310283
311- #if 0 // part of the old verification system
312- /**
313- * @brief Verifies each sensor by calling each verify() function
314- *
315- * @return int The number of verified sensors
316- */
317- int verifySensors() {
318- int count = 0;
319- uint32_t bit_array = 0b11; // start with a bit for header and for millis
320- // (they will always be there)
321- for (int i = 0; i < sensors_len; i++) {
322- sensors_verify[i] = sensors[i]->verify();
323- if (sensors_verify[i]) {
324- count++;
325- bit_array =
326- (bit_array << 1) | 0b1; // if the sensor is verified shift a 1 in
327- } else {
328- bit_array = (bit_array << 1); // otherwise shift a 0 in
329- }
330- }
331- header_condensed =
332- String(bit_array, HEX); // translate it to hex to condense it for the csv
333-
334- log_core("Pin Verification Results:");
335- for (int i = 0; i < sensors_len; i++) {
336- log_core((sensors[i]->getDeviceName()) + ": " +
337- (sensors_verify[i]
338- ? "Successful in Communication"
339- : "Failure in Communication (check wirings and/ or pin "
340- "definitions)"));
341- }
342- log_core("");
343- return count;
344- }
345- #endif
346-
347284/* *
348285 * @brief Reads sensor data into a packet byte array
349286 *
0 commit comments