Skip to content

Commit

Permalink
Added the proposed new geotagging from flipper files. kept the old on…
Browse files Browse the repository at this point in the history
…es for compatibility (#2289)
  • Loading branch information
htotoo authored Oct 8, 2024
1 parent 09c2c43 commit 99d8fbd
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions firmware/application/flipper_subfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ using namespace std::literals;

const std::string_view filetype_name = "Filetype"sv;
const std::string_view frequency_name = "Frequency"sv;
const std::string_view latitude_name = "Latitute"sv;
const std::string_view longitude_name = "Longitude"sv;
const std::string_view latitude_name_old = "Latitute"sv;
const std::string_view longitude_name_old = "Longitude"sv;
const std::string_view latitude_name = "Lat"sv;
const std::string_view longitude_name = "Lon"sv;
const std::string_view protocol_name = "Protocol"sv;
const std::string_view preset_name = "Preset"sv;
const std::string_view te_name = "TE"sv; // only in BinRAW
Expand Down Expand Up @@ -93,6 +95,10 @@ Optional<flippersub_metadata> read_flippersub_file(const fs::path& path) {
parse_float_meta(fixed, metadata.latitude);
else if (cols[0] == longitude_name)
parse_float_meta(fixed, metadata.longitude);
else if (cols[0] == latitude_name_old)
parse_float_meta(fixed, metadata.latitude);
else if (cols[0] == longitude_name_old)
parse_float_meta(fixed, metadata.longitude);
else if (cols[0] == protocol_name) {
if (fixed == "RAW") metadata.protocol = FLIPPER_PROTO_RAW;
if (fixed == "BinRAW") metadata.protocol = FLIPPER_PROTO_BINRAW;
Expand Down

0 comments on commit 99d8fbd

Please sign in to comment.