mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-10-01 01:26:06 -04:00
Merge branch 'eried:next' into next
This commit is contained in:
commit
1976c3648b
71
.github/workflows/create_nightly_release.yml
vendored
Normal file
71
.github/workflows/create_nightly_release.yml
vendored
Normal file
@ -0,0 +1,71 @@
|
||||
# ToDo: only trigger after 24 hours if there are actually changes: https://github.community/t/trigger-action-on-schedule-only-if-there-are-changes-to-the-branch/17887/4
|
||||
|
||||
name: Nightly Release
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 * * *"
|
||||
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Get current date
|
||||
id: date
|
||||
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
|
||||
- name: Checkout
|
||||
uses: actions/checkout@master
|
||||
with:
|
||||
ref: next
|
||||
submodules: true
|
||||
- name: Git Sumbodule Update
|
||||
run: |
|
||||
git submodule update --init --recursive
|
||||
- name: Build the Docker image
|
||||
run: docker build -t portapack-dev -f dockerfile-nogit . --tag my-image-name:$(date +%s)
|
||||
- name: Make build folder
|
||||
run: mkdir ${{ github.workspace }}/build
|
||||
- name: Run the Docker image
|
||||
run: docker run -i -v ${{ github.workspace }}:/havoc portapack-dev
|
||||
- name: Create Firmware ZIP
|
||||
run: |
|
||||
zip --junk-paths firmware build/firmware/portapack-h1_h2-mayhem.bin
|
||||
- name: Create SD Card ZIP
|
||||
run: |
|
||||
zip -r sdcard.zip sdcard
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: nightly-tag-${{ steps.date.outputs.date }}
|
||||
release_name: Nightly-release - ${{ steps.date.outputs.date }}
|
||||
body: |
|
||||
**Nightly release - ${{ steps.date.outputs.date }}**
|
||||
This build is the latest and greatest, although may not be the most stable as this is a nightly release.
|
||||
You can find the changes in this commit ${{ github.sha }}
|
||||
draft: false
|
||||
prerelease: true
|
||||
- name: Upload Firmware Asset
|
||||
id: upload-firmware-asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ./firmware.zip
|
||||
asset_name: mayhem_nightly_${{ steps.date.outputs.date }}_FIRMWARE.zip
|
||||
asset_content_type: application/zip
|
||||
- name: Upload SD Card Assets
|
||||
id: upload-sd-card-asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ./sdcard.zip
|
||||
asset_name: mayhem_nightly_${{ steps.date.outputs.date }}_COPY_TO_SDCARD.zip
|
||||
asset_content_type: application/zip
|
@ -129,6 +129,9 @@ AnalogAudioView::AnalogAudioView(
|
||||
&waterfall
|
||||
});
|
||||
|
||||
//Filename Datetime and Frequency
|
||||
record_view.set_filename_date_frequency(true);
|
||||
|
||||
field_frequency.set_value(receiver_model.tuning_frequency());
|
||||
field_frequency.set_step(receiver_model.frequency_step());
|
||||
field_frequency.on_change = [this](rf::Frequency f) {
|
||||
|
@ -28,11 +28,11 @@
|
||||
#include "ui_receiver.hpp"
|
||||
#include "ui_spectrum.hpp"
|
||||
#include "ui_record_view.hpp"
|
||||
|
||||
#include "ui_font_fixed_8x16.hpp"
|
||||
|
||||
#include "tone_key.hpp"
|
||||
|
||||
|
||||
namespace ui {
|
||||
|
||||
constexpr Style style_options_group {
|
||||
@ -216,7 +216,10 @@ private:
|
||||
|
||||
RecordView record_view {
|
||||
{ 0 * 8, 2 * 16, 30 * 8, 1 * 16 },
|
||||
u"AUD_????", RecordView::FileType::WAV, 4096, 4
|
||||
u"AUD",
|
||||
RecordView::FileType::WAV,
|
||||
4096,
|
||||
4
|
||||
};
|
||||
|
||||
spectrum::WaterfallWidget waterfall { true };
|
||||
|
@ -136,7 +136,7 @@ private:
|
||||
3,
|
||||
{
|
||||
{ "315", 315000000 },
|
||||
{ "434", 433920000 },
|
||||
{ "433", 433920000 },
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -37,7 +37,8 @@ namespace ui
|
||||
console.writeln("vXxOinvizioNxX,teixeluis");
|
||||
console.writeln("Brumi-2021,texasyojimbo");
|
||||
console.writeln("heurist1,intoxsick,ckuethe");
|
||||
console.writeln("notpike");
|
||||
console.writeln("notpike,jLynx,zigad");
|
||||
console.writeln("MichalLeonBorsuk");
|
||||
console.writeln("");
|
||||
break;
|
||||
|
||||
|
@ -129,6 +129,11 @@ std::string to_string_decimal(float decimal, int8_t precision) {
|
||||
return result;
|
||||
}
|
||||
|
||||
std::string to_string_freq(const uint64_t f) {
|
||||
auto final_str = to_string_dec_int(f / 1000000,4) + to_string_dec_int(f % 1000000, 6, '0');
|
||||
return final_str;
|
||||
}
|
||||
|
||||
std::string to_string_short_freq(const uint64_t f) {
|
||||
auto final_str = to_string_dec_int(f / 1000000,4) + "." + to_string_dec_int((f / 100) % 10000, 4, '0');
|
||||
return final_str;
|
||||
|
@ -48,6 +48,7 @@ std::string to_string_decimal(float decimal, int8_t precision);
|
||||
std::string to_string_hex(const uint64_t n, const int32_t l = 0);
|
||||
std::string to_string_hex_array(uint8_t * const array, const int32_t l = 0);
|
||||
|
||||
std::string to_string_freq(const uint64_t f);
|
||||
std::string to_string_short_freq(const uint64_t f);
|
||||
std::string to_string_time_ms(const uint32_t ms);
|
||||
|
||||
|
@ -212,7 +212,7 @@ namespace ui
|
||||
void refresh();
|
||||
|
||||
private:
|
||||
static constexpr auto version_string = "v1.4.3";
|
||||
static constexpr auto version_string = "v1.4.4";
|
||||
NavigationView &nav_;
|
||||
|
||||
Rectangle backdrop{
|
||||
|
@ -127,6 +127,11 @@ void RecordView::set_sampling_rate(const size_t new_sampling_rate) {
|
||||
}
|
||||
}
|
||||
|
||||
// Setter for datetime and frequency filename
|
||||
void RecordView::set_filename_date_frequency(bool set) {
|
||||
filename_date_frequency = set;
|
||||
}
|
||||
|
||||
bool RecordView::is_active() const {
|
||||
return (bool)capture_thread;
|
||||
}
|
||||
@ -149,7 +154,24 @@ void RecordView::start() {
|
||||
return;
|
||||
}
|
||||
|
||||
auto base_path = next_filename_stem_matching_pattern(filename_stem_pattern);
|
||||
|
||||
std::filesystem::path base_path;
|
||||
if(filename_date_frequency) {
|
||||
rtcGetTime(&RTCD1, &datetime);
|
||||
|
||||
//ISO 8601
|
||||
std::string date_time = to_string_dec_uint(datetime.year(), 4, '0') +
|
||||
to_string_dec_uint(datetime.month(), 2, '0') +
|
||||
to_string_dec_uint(datetime.day(), 2, '0') + "T" +
|
||||
to_string_dec_uint(datetime.hour()) +
|
||||
to_string_dec_uint(datetime.minute()) +
|
||||
to_string_dec_uint(datetime.second());
|
||||
|
||||
base_path = filename_stem_pattern.string() + "_" + date_time + "_" + to_string_freq(receiver_model.tuning_frequency()) + "Hz";
|
||||
} else {
|
||||
base_path = next_filename_stem_matching_pattern(filename_stem_pattern);
|
||||
}
|
||||
|
||||
if( base_path.empty() ) {
|
||||
return;
|
||||
}
|
||||
|
@ -63,6 +63,8 @@ public:
|
||||
|
||||
bool is_active() const;
|
||||
|
||||
void set_filename_date_frequency(bool set);
|
||||
|
||||
private:
|
||||
void toggle();
|
||||
//void toggle_pitch_rssi();
|
||||
@ -75,6 +77,11 @@ private:
|
||||
void handle_error(const File::Error error);
|
||||
|
||||
//bool pitch_rssi_enabled = false;
|
||||
|
||||
// Time Stamp
|
||||
bool filename_date_frequency = false;
|
||||
rtc::RTC datetime { };
|
||||
|
||||
const std::filesystem::path filename_stem_pattern;
|
||||
const FileType file_type;
|
||||
const size_t write_size;
|
||||
|
Binary file not shown.
Binary file not shown.
11
sdcard/SAMPLES/README.md
Normal file
11
sdcard/SAMPLES/README.md
Normal file
@ -0,0 +1,11 @@
|
||||
# Files for Replay app
|
||||
|
||||
Sample files below can be used with Replay app.
|
||||
|
||||
See [Wiki](https://github.com/eried/portapack-mayhem/wiki/C16-format) for more info over C16 file format.
|
||||
|
||||
| file | description | frequency |
|
||||
| ------ | ------ | ------: |
|
||||
| [HamptonBayFanOnOff.C16](HamptonBayFanOnOff.C16) | Switches Hampton Bay fan on/off. |304.175 Mhz |
|
||||
| [TeslaChargePort_EU_AU.C16](TeslaChargePort_EU_AU.C16) | Opens a Tesla charge door. This version is for non-US Tesla cars operating at 433MHz. | 433.95 Mhz |
|
||||
| [TeslaChargePort_US.C16](TeslaChargePort_US.C16) | Opens a Tesla charge door. This version is for US Tesla cars operating at 315MHz. |315 Mhz |
|
BIN
sdcard/SAMPLES/TeslaChargePort_EU_AU.C16
Normal file
BIN
sdcard/SAMPLES/TeslaChargePort_EU_AU.C16
Normal file
Binary file not shown.
2
sdcard/SAMPLES/TeslaChargePort_EU_AU.TXT
Normal file
2
sdcard/SAMPLES/TeslaChargePort_EU_AU.TXT
Normal file
@ -0,0 +1,2 @@
|
||||
sample_rate=500000
|
||||
center_frequency=433950000
|
BIN
sdcard/SAMPLES/TeslaChargePort_US.C16
Normal file
BIN
sdcard/SAMPLES/TeslaChargePort_US.C16
Normal file
Binary file not shown.
2
sdcard/SAMPLES/TeslaChargePort_US.TXT
Normal file
2
sdcard/SAMPLES/TeslaChargePort_US.TXT
Normal file
@ -0,0 +1,2 @@
|
||||
sample_rate=500000
|
||||
center_frequency=315000000
|
Loading…
Reference in New Issue
Block a user