Skip to content

Commit

Permalink
Merge pull request #16 from ElectronicCats/patch_wardriving
Browse files Browse the repository at this point in the history
fix: fix Wardriving header CSV
  • Loading branch information
sabas1080 authored Dec 13, 2024
2 parents 8ed29da + 3fe4f0c commit e534ed2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
9 changes: 5 additions & 4 deletions firmware/main/modules/gps/war_bee/warbee_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ static uint16_t csv_lines;
char* csv_file_name = NULL;
char* csv_file_buffer = NULL;

const char* csv_header = FORMAT_VERSION
const char* war_bee_csv_header = FORMAT_VERSION
",appRelease=" APP_VERSION ",model=" MODEL ",release=" RELEASE
",device=" DEVICE ",display=" DISPLAY ",board=" BOARD ",brand=" BRAND
",star=" STAR ",body=" BODY ",subBody=" SUB_BODY
Expand Down Expand Up @@ -136,7 +136,8 @@ static void warbee_gps_event_handler_cb(gps_t* gps) {
return;
}

sprintf(csv_file_buffer, "%s\n", csv_header); // Append header to csv file
sprintf(csv_file_buffer, "%s\n",
war_bee_csv_header); // Append header to csv file
}

if (gps->sats_in_use == 0) {
Expand Down Expand Up @@ -315,7 +316,7 @@ static void warbee_packet_dissector(uint8_t* packet, uint8_t packet_length) {
}

sprintf(csv_file_buffer, "%s\n",
csv_header); // Append header to csv file
war_bee_csv_header); // Append header to csv file
} else {
sd_card_append_to_file(csv_file_name, csv_line_buffer);
}
Expand Down Expand Up @@ -347,7 +348,7 @@ void warbee_module_begin() {
}

sprintf(csv_file_name, "%s.csv", FILE_NAME);
sprintf(csv_file_buffer, "%s\n", csv_header);
sprintf(csv_file_buffer, "%s\n", war_bee_csv_header);

context_session.session_str = "";

Expand Down
4 changes: 2 additions & 2 deletions firmware/main/modules/gps/wardriving/wardriving_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ void wardriving_module_scan_task(void* pvParameters) {
*
* @return void
*/
void update_file_name(char* full_date_time) {
static void update_file_name(char* full_date_time) {
sprintf(csv_file_name, "%s_%s.csv", FILE_NAME, full_date_time);
// Replace " " by "_" and ":" by "-"
for (int i = 0; i < strlen(csv_file_name); i++) {
Expand All @@ -128,7 +128,7 @@ void update_file_name(char* full_date_time) {
*
* @return void
*/
void wardriving_module_save_to_file(gps_t* gps) {
static void wardriving_module_save_to_file(gps_t* gps) {
esp_err_t err = sd_card_create_dir(WARFI_DIR_NAME);

if (err != ESP_OK) {
Expand Down
2 changes: 1 addition & 1 deletion firmware/sdkconfig.noota
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CONFIG_PROJECT_VERSION="1.1.5.0"
CONFIG_PROJECT_VERSION="1.1.5.1"

#
# Enabled Features
Expand Down
2 changes: 1 addition & 1 deletion firmware/sdkconfig.ota
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CONFIG_PROJECT_VERSION="1.1.5.0"
CONFIG_PROJECT_VERSION="1.1.5.1"

#
# Enabled Features
Expand Down

0 comments on commit e534ed2

Please sign in to comment.