mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2026-09-10 00:29:33 +00:00
Wardrive map improv (#2251)
Added paginator. Added Flipper SUB file support.
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Copyright (C) 2024 HTotoo
|
||||
*
|
||||
* This file is part of PortaPack.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 51 Franklin Street,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef __FLIPPER_SUBFILE_HPP__
|
||||
#define __FLIPPER_SUBFILE_HPP__
|
||||
|
||||
#include "metadata_file.hpp"
|
||||
|
||||
typedef enum : uint8_t {
|
||||
FLIPPER_PROTO_UNSUPPORTED = 0,
|
||||
FLIPPER_PROTO_RAW = 1,
|
||||
FLIPPER_PROTO_BINRAW = 2
|
||||
} FlipperProto;
|
||||
|
||||
typedef enum : uint8_t {
|
||||
FLIPPER_PRESET_UNK = 0,
|
||||
FLIPPER_PRESET_CUSTOM = 1,
|
||||
FLIPPER_PRESET_OOK = 2,
|
||||
FLIPPER_PRESET_2FSK = 3,
|
||||
} FlipperPreset;
|
||||
|
||||
struct flippersub_metadata {
|
||||
rf::Frequency center_frequency;
|
||||
float latitude = 0;
|
||||
float longitude = 0;
|
||||
FlipperProto protocol = FLIPPER_PROTO_UNSUPPORTED;
|
||||
FlipperPreset preset = FLIPPER_PRESET_UNK;
|
||||
uint16_t te = 0;
|
||||
};
|
||||
|
||||
Optional<flippersub_metadata> read_flippersub_file(const std::filesystem::path& path);
|
||||
|
||||
// Maybe sometime there will be a data part reader / converter
|
||||
|
||||
#endif // __FLIPPER_SUBFILE_HPP__
|
||||
Reference in New Issue
Block a user