Skip to content

Commit

Permalink
Update MissionInterface.ino
Browse files Browse the repository at this point in the history
  • Loading branch information
771-8bit committed Mar 23, 2024
1 parent 9e91313 commit d36f607
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions MissionInterface/MissionInterface.ino
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ CCP_MCP2515 CCP(CAN_CS, CAN_INT);
#include <W25Q512.h>
#include "Queue.h"
W25Q512 flash(SPI, FLASH_CS);
static uint8_t flash_buf[256];
static size_t flash_index = 0;
static uint32_t flash_addr = 0;

typedef enum {
SLEEP,
Expand Down Expand Up @@ -58,9 +61,6 @@ void setup() {
}

void flash_print(char str[]) {
static uint8_t flash_buf[256];
static size_t flash_index = 0;
static uint32_t flash_addr = 0;

// Serial.print("flash_addr: ");
// Serial.println(flash_addr);
Expand Down Expand Up @@ -133,6 +133,8 @@ void loop() {
} else if (data_str == "flash-clear") {
flash.chipErase(false); // non-blocking
flash_mode = CLEARING;
flash_index = 0;
flash_addr = 0;
} else {
data_str += "\n";
data_str.toCharArray(data_char, 256);
Expand Down

0 comments on commit d36f607

Please sign in to comment.