Skip to content

Commit

Permalink
Don't use storage in BLE+Ranging Test
Browse files Browse the repository at this point in the history
  • Loading branch information
hedgecrw committed Jan 9, 2024
1 parent 7133ad9 commit af73a95
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions software/firmware/src/peripherals/src/storage.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

// Chip-Specific Definitions -------------------------------------------------------------------------------------------

#if REVISION_ID != REVISION_APOLLO4_EVB
#if REVISION_ID != REVISION_APOLLO4_EVB && !defined(_TEST_BLE_RANGING_TASK)

#define STORAGE_DEVICE_ID { 0xEF, 0xBA, 0x21 }

Expand Down Expand Up @@ -676,4 +676,4 @@ void storage_exit_maintenance_mode(void) {}
uint32_t storage_retrieve_data_length(void) { return 0; }
uint32_t storage_retrieve_next_data_chunk(uint8_t *buffer) { return 0; }

#endif // #if REVISION_ID != REVISION_APOLLO4_EVB
#endif // #if REVISION_ID != REVISION_APOLLO4_EVB && !defined(_TEST_BLE_RANGING_TASK)
6 changes: 3 additions & 3 deletions software/firmware/src/tasks/storage_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ static uint32_t range_data_index;

// Private Helper Functions --------------------------------------------------------------------------------------------

#if REVISION_ID != REVISION_APOLLO4_EVB
#if REVISION_ID != REVISION_APOLLO4_EVB && !defined(_TEST_BLE_RANGING_TASK)

static void store_battery_voltage(uint32_t timestamp, uint32_t battery_voltage_mV)
{
Expand Down Expand Up @@ -117,7 +117,7 @@ void storage_write_charging_event(battery_event_t battery_event) {}
void storage_write_motion_status(bool in_motion) {}
void storage_write_ranging_data(uint32_t timestamp, const uint8_t *ranging_data, uint32_t ranging_data_len) {}

#endif // #if REVISION_ID != REVISION_APOLLO4_EVB
#endif // #if REVISION_ID != REVISION_APOLLO4_EVB && !defined(_TEST_BLE_RANGING_TASK)

void StorageTask(void *params)
{
Expand All @@ -135,7 +135,7 @@ void StorageTask(void *params)
// Loop forever, waiting until storage events are received
while (true)
if (xQueueReceive(storage_queue, &item, portMAX_DELAY) == pdPASS)
#if REVISION_ID == REVISION_APOLLO4_EVB
#if REVISION_ID == REVISION_APOLLO4_EVB && !defined(_TEST_BLE_RANGING_TASK)
if (item.type == STORAGE_TYPE_SHUTDOWN)
system_reset(true);
#else
Expand Down
2 changes: 1 addition & 1 deletion software/firmware/tests/tasks/test_ble_and_ranging.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ int main(void)
system_enable_interrupts(false);

// Create tasks with the following priority order:
// IdleTask < AppTask < BLETask < RangingTask
// IdleTask < TimeAlignedTask < AppTask < BLETask < RangingTask
xTaskCreateStatic(RangingTask, "RangingTask", configMINIMAL_STACK_SIZE, uid, 4, ranging_task_stack, &ranging_task_tcb);
xTaskCreateStatic(BLETask, "BLETask", 2*configMINIMAL_STACK_SIZE, NULL, 3, ble_task_stack, &ble_task_tcb);
xTaskCreateStatic(AppTaskRanging, "AppTask", configMINIMAL_STACK_SIZE, uid, 2, app_task_stack, &app_task_tcb);
Expand Down

0 comments on commit af73a95

Please sign in to comment.