Compare commits

...

27 Commits

Author SHA1 Message Date
Erwin Ried
a91bbe6a2e Merge pull request #596 from GullCode/proc-adsbrx-warning-fix
Fix for warning: comparison of integer expressions of different signedness
2022-04-22 10:00:05 +02:00
Erwin Ried
a5a9bc85f8 Merge pull request #597 from GullCode/proc-aprsrx-warning-fix
Fix for proc_aprsrx and aprs_packet warnings, they are related
2022-04-22 09:59:31 +02:00
Erwin Ried
b23addd452 Merge pull request #598 from GullCode/tpms-warning-fix
Fix for warning: narrowing conversion
2022-04-22 09:59:21 +02:00
Erwin Ried
6467e5e7e6 Merge pull request #599 from GullCode/proc_mictx-warning-fix
Fix for warning: 'MicTXProcessor::modulator' should be initialized
2022-04-22 09:59:08 +02:00
Erwin Ried
35ed394b37 Merge pull request #601 from GullCode/ais_app-warning-fix
Added missing contructors/operators/etc in ais_app
2022-04-22 09:59:01 +02:00
Erwin Ried
4c98cf16a1 Merge pull request #600 from GullCode/ui_qrcode-warning-fix
Fix for weffc++
2022-04-22 08:19:43 +02:00
Erwin Ried
18be6750e5 Merge pull request #602 from GullCode/ui_adsb_rx-warning-fix
Added missing initializer
2022-04-22 08:19:03 +02:00
Erwin Ried
4f58be737a Merge pull request #603 from GullCode/proc_pocsag-warning-fix
Fix warning for proc_pocsag
2022-04-22 01:04:22 +02:00
GullCode
3fa190324b Fix warning for proc_pocsag 2022-04-21 23:25:58 +02:00
GullCode
de042df7eb Added missing initializer 2022-04-21 23:12:37 +02:00
GullCode
2fbf96425a Added missing contructors/operators/etc in ais_app 2022-04-21 22:52:17 +02:00
GullCode
85d5a8fdba Fix for weffc++ 2022-04-21 22:27:20 +02:00
GullCode
f13d1f8b9c Fix for warning: 'MicTXProcessor::modulator' should be initialized 2022-04-21 21:46:55 +02:00
GullCode
f804d7997c Fix for warning: narrowing conversion 2022-04-21 21:41:02 +02:00
GullCode
2108ea53fa Fix for proc_aprsrx and aprs_packet warnings, they are related 2022-04-21 17:38:49 +02:00
GullCode
90d38af705 Fix for warning: comparison of integer expressions of different signedness 2022-04-21 17:29:42 +02:00
Erwin Ried
d617618dcd Merge pull request #592 from GullCode/ui-aprs-rx-warning-fix
Fix for warning XXX should be initialized
2022-04-21 09:15:53 +02:00
GullCode
c37df0c6fd Fix for warning XXX should be initialized in the member initialization list 2022-04-19 17:23:30 +02:00
Erwin Ried
cdba4fa5bf Merge pull request #590 from GullCode/a-packet-warning-fix
Fixed warning: comparison of integer expressions of different signedness
2022-04-18 23:29:41 +02:00
Erwin Ried
1537b1eccb Merge pull request #589 from GullCode/qrcode-warning-fix
Qrcode warning fix
2022-04-18 23:29:08 +02:00
GullCode
048b254354 Fixed uninitialized class members 2022-04-18 22:45:16 +02:00
GullCode
4b87a8a7dd Fixed warning: comparison of integer expressions of different signedness 2022-04-18 22:38:29 +02:00
GullCode
5cdaac6b82 Fix uneeded negative test because type is uint ( warning: comparison is always false due to limited range of data type) 2022-04-18 22:33:10 +02:00
GullCode
17aa58bbf8 Changed pramga to comments to fix warning: ignoring #pragma mark [-Wunknown-pragmas] 2022-04-18 22:32:43 +02:00
Erwin Ried
e93a5820a2 Merge pull request #587 from notpike/grc
Added GRC C16 to complex script
2022-04-17 20:45:54 +02:00
notpike
0e9c7448c0 Added GRC C16 to complex script 2022-04-17 11:05:20 -07:00
jLynx
9f54f4b5eb Added stable release pipeline (#573) 2022-04-13 18:02:43 +12:00
22 changed files with 324 additions and 39 deletions

View File

@@ -0,0 +1,93 @@
name: Stable Release
on:
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:
fetch-depth: 0
ref: next
submodules: true
- name: Git Sumbodule Update
run: |
git submodule update --init --recursive
- name: Get version
id: version
run: echo "::set-output name=version::$(cat .github/workflows/version.txt)"
- name: Get past version
id: past_version
run: echo "::set-output name=past_version::$(cat .github/workflows/past_version.txt)"
- 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 -e VERSION_STRING=${{ steps.version.outputs.version }} -i -v ${{ github.workspace }}:/havoc portapack-dev
- name: Create Firmware ZIP
run: |
zip -j firmware.zip build/firmware/portapack-h1_h2-mayhem.bin && cd flashing && zip -r ../firmware.zip *
- name: Create SD Card ZIP
run: |
zip -r sdcard.zip sdcard
- name: Create changelog
run: |
CHANGELOG=$(python3 .github/workflows/stable_changelog.py ${{ steps.past_version.outputs.past_version }})
CHANGELOG="${CHANGELOG//'%'/'%25'}"
CHANGELOG="${CHANGELOG//$'\n'/'%0A'}"
CHANGELOG="${CHANGELOG//$'\r'/'%0D'}"
echo "::set-output name=content::$CHANGELOG"
id: changelog
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v1.5.1
release_name: Mayhem firmware ${{ steps.version.outputs.version }}
body: |
**Stable release - ${{ steps.version.outputs.version }}**
This is a fork of the [Havoc](https://github.com/furrtek/portapack-havoc/) firmware, which itself was a fork of the [PortaPack](https://github.com/sharebrained/portapack-hackrf) firmware, an add-on for the [HackRF](http://greatscottgadgets.com/hackrf/). Please check the [readme](https://github.com/eried/portapack-mayhem/blob/master/README.md) for details.
## Release notes
### Revision (${{ steps.version.outputs.version }}):
${{ steps.changelog.outputs.content }}
**Full Changelog**: https://github.com/eried/portapack-mayhem/compare/${{ steps.past_version.outputs.past_version }}...${{ steps.version.outputs.version }}
## Installation
Check the [wiki](https://github.com/eried/portapack-havoc/wiki/Update-firmware) for details how to upgrade.
### MicroSD card files
For certain functionality, like the world map, GPS simulator, and others you need to uncompress (using [7-zip](https://www.7-zip.org/download.html)) the files from `mayhem_vX.Y.Z_COPY_TO_SDCARD.zip` to a FAT32 formatted MicroSD card.
draft: true
prerelease: false
- 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_${{ steps.version.outputs.version }}_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_${{ steps.version.outputs.version }}_COPY_TO_SDCARD.zip
asset_content_type: application/zip

1
.github/workflows/past_version.txt vendored Normal file
View File

@@ -0,0 +1 @@
v1.5.0

30
.github/workflows/stable_changelog.py vendored Normal file
View File

@@ -0,0 +1,30 @@
import os
import re
import sys
past_version = sys.argv[1]
raw_git = os.popen('git log ' + past_version + '..next --pretty=format:"- %h - {USERNAME}*+%al-%an*: %s"').read()
def compute_username(line):
stripped = re.search(r'(?<=\*)(.*?)(?=\*)', line).group(0)
pattern = re.compile("[$@+&?].*[$@+&?]")
if pattern.match(stripped):
stripped = re.sub("[$@+&?].*[$@+&?]", "", stripped)
stripped = re.match(r'.+?(?=-)', stripped).group(0)
else:
stripped = re.sub(r'^.*?-', "", stripped)
return "@" + stripped
def compile_line(line):
username = compute_username(line)
line = re.sub(r'[*].*[*]', "", line)
line = line.replace("{USERNAME}", username)
return line
for row in raw_git.splitlines():
print(compile_line(row))

1
.github/workflows/version.txt vendored Normal file
View File

@@ -0,0 +1 @@
v1.5.1

View File

@@ -254,8 +254,18 @@ AISRecentEntryDetailView::AISRecentEntryDetailView(NavigationView& nav) {
};
}
AISRecentEntryDetailView::AISRecentEntryDetailView(const AISRecentEntryDetailView&Entry) : View()
{
(void)Entry;
}
AISRecentEntryDetailView & AISRecentEntryDetailView::operator=(const AISRecentEntryDetailView&Entry)
{
(void)Entry;
return *this;
}
void AISRecentEntryDetailView::update_position() {

View File

@@ -127,6 +127,9 @@ public:
void focus() override;
void paint(Painter&) override;
AISRecentEntryDetailView(const AISRecentEntryDetailView&Entry);
AISRecentEntryDetailView &operator=(const AISRecentEntryDetailView&Entry);
private:
AISRecentEntry entry_ { };

View File

@@ -184,7 +184,7 @@ private:
AircraftRecentEntry entry_copy { 0 };
std::function<void(void)> on_close_ { };
bool send_updates { false };
std::database db;
std::database db = { };
std::string icao_code = "";
int return_code = 0;
@@ -279,7 +279,7 @@ private:
GeoMapView* geomap_view { nullptr };
ADSBRxAircraftDetailsView* aircraft_details_view { nullptr };
bool send_updates { false };
std::database db;
std::database db = { };
std::string airline_code = "";
int return_code = 0;
@@ -368,7 +368,7 @@ public:
void sort_entries_by_state();
private:
rf::Frequency prevFreq;
rf::Frequency prevFreq = { 0 };
std::unique_ptr<ADSBLogger> logger { };
void on_frame(const ADSBFrameMessage * message);
void on_tick_second();

View File

@@ -57,12 +57,12 @@ struct APRSRecentEntry {
uint16_t hits { 0 };
uint32_t age { 0 };
uint64_t source;
uint64_t source { 0 };
std::string source_formatted { " " };
std::string time_string { "" };
std::string info_string { "" };
aprs::aprs_pos pos;
aprs::aprs_pos pos { 0 , 0 , 0 , 0 };
bool has_position = false;
APRSRecentEntry(uint64_t src)
{

View File

@@ -38,7 +38,7 @@
#include <stdlib.h>
#include <string.h>
#pragma mark - Error Correction Lookup tables
/* #pragma mark - Error Correction Lookup tables */
#if LOCK_VERSION == 0
@@ -101,7 +101,7 @@ static int abs(int value) {
*/
#pragma mark - Mode testing and conversion
/* #pragma mark - Mode testing and conversion */
static int8_t getAlphanumeric(char c) {
@@ -140,7 +140,7 @@ static bool isNumeric(const char *text, uint16_t length) {
}
#pragma mark - Counting
/* #pragma mark - Counting */
// We store the following tightly packed (less 8) in modeInfo
// <=9 <=26 <= 40
@@ -167,7 +167,7 @@ static char getModeBits(uint8_t version, uint8_t mode) {
}
#pragma mark - BitBucket
/* #pragma mark - BitBucket */
typedef struct BitBucket {
uint32_t bitOffsetOrWidth;
@@ -251,7 +251,7 @@ static bool bb_getBit(BitBucket *bitGrid, uint8_t x, uint8_t y) {
}
#pragma mark - Drawing Patterns
/* #pragma mark - Drawing Patterns */
// XORs the data modules in this QR Code with the given mask pattern. Due to XOR's mathematical
// properties, calling applyMask(m) twice with the same value is equivalent to no change at all.
@@ -474,7 +474,7 @@ static void drawCodewords(BitBucket *modules, BitBucket *isFunction, BitBucket *
#pragma mark - Penalty Calculation
/* #pragma mark - Penalty Calculation */
#define PENALTY_N1 3
#define PENALTY_N2 3
@@ -574,7 +574,7 @@ static uint32_t getPenaltyScore(BitBucket *modules) {
}
#pragma mark - Reed-Solomon Generator
/* #pragma mark - Reed-Solomon Generator */
static uint8_t rs_multiply(uint8_t x, uint8_t y) {
// Russian peasant multiplication
@@ -628,7 +628,7 @@ static void rs_getRemainder(uint8_t degree, uint8_t *coeff, uint8_t *data, uint8
#pragma mark - QrCode
/* #pragma mark - QrCode */
static int8_t encodeDataCodewords(BitBucket *dataCodewords, const uint8_t *text, uint16_t length, uint8_t version) {
int8_t mode = MODE_BYTE;
@@ -769,7 +769,7 @@ static void performErrorCorrection(uint8_t version, uint8_t ecc, BitBucket *data
static const uint8_t ECC_FORMAT_BITS = (0x02 << 6) | (0x03 << 4) | (0x00 << 2) | (0x01 << 0);
#pragma mark - Public QRCode functions
/* #pragma mark - Public QRCode functions */
uint16_t qrcode_getBufferSize(uint8_t version) {
return bb_getGridSizeBytes(4 * version + 17);
@@ -857,7 +857,7 @@ int8_t qrcode_initText(QRCode *qrcode, uint8_t *modules, uint8_t version, uint8_
}
bool qrcode_getModule(QRCode *qrcode, uint8_t x, uint8_t y) {
if (x < 0 || x >= qrcode->size || y < 0 || y >= qrcode->size) {
if ( x >= qrcode->size || y >= qrcode->size) {
return false;
}
@@ -873,4 +873,4 @@ uint8_t qrcode_getHexLength(QRCode *qrcode) {
void qrcode_getHex(QRCode *qrcode, char *result) {
}
*/
*/

View File

@@ -43,8 +43,25 @@ QRCodeImage::QRCodeImage(
}
QRCodeImage::~QRCodeImage( )
{
}
QRCodeImage::QRCodeImage(const QRCodeImage&Image) : Widget { }
{
(void)Image;
}
QRCodeImage & QRCodeImage::operator=(const QRCodeImage&Image)
{
(void)Image;
return *this;
}
void QRCodeImage::paint(Painter& painter) {
(void)painter ;
// The structure to manage the QR code
QRCode qrcode;

View File

@@ -40,10 +40,13 @@ public:
qr_text_ = qr_text;
}
void paint(Painter& painter) override;
// for -weffc++ to be killed
~QRCodeImage(); // destructor
QRCodeImage(const QRCodeImage&Image);
QRCodeImage & operator=(const QRCodeImage &Image); // assignment
private:
const char * qr_text_ ;
const char * qr_text_ = NULL ;
};
class QRCodeView : public View {

View File

@@ -35,8 +35,8 @@ public:
private:
uint8_t n = 0;
SOSFilter<5> sos_i;
SOSFilter<5> sos_q;
SOSFilter<5> sos_i = {};
SOSFilter<5> sos_q = {};
};
} /* namespace dsp */

View File

@@ -120,7 +120,7 @@ void ADSBRXProcessor::execute(const buffer_c8_t& buffer) {
// the high levels as signals can be out of phase so part of the
// energy can be in the near samples
int32_t thisAmp = (shifter[1] + shifter[3] + shifter[8] + shifter[10]);
int32_t high = thisAmp / 9;
uint32_t high = thisAmp / 9;
if (
shifter[5] < high &&
shifter[6] < high &&

View File

@@ -125,18 +125,18 @@ private:
uint32_t sample_bits { 0 };
uint32_t phase { }, phase_inc { };
int32_t sample_mixed { }, prev_mixed { }, sample_filtered { }, prev_filtered { };
uint8_t last_bit;
uint8_t ones_count = 0;
uint8_t last_bit = 0;
uint8_t ones_count = 0 ;
uint8_t current_byte = 0;
uint8_t byte_index = 0;
uint8_t packet_buffer[256];
size_t packet_buffer_size = 0;
bool configured { false };
bool wait_start { };
bool bit_value { };
bool wait_start { 0 };
bool bit_value { 0 };
aprs::APRSPacket aprs_packet;
aprs::APRSPacket aprs_packet { };
void configure(const APRSRxConfigureMessage& message);
void capture_config(const CaptureConfigMessage& message);

View File

@@ -51,7 +51,7 @@ private:
AudioInput audio_input { };
ToneGen tone_gen { };
ToneGen beep_gen { };
dsp::modulate::Modulator *modulator;
dsp::modulate::Modulator *modulator = NULL ;
bool am_enabled { false };
bool fm_enabled { true };

View File

@@ -68,6 +68,16 @@ public:
delete[] m_lastVals;
}
SmoothVals(const SmoothVals<float, float>&)
{
}
SmoothVals & operator=(const SmoothVals<float, float>&)
{
return *this ;
}
// --------------------------------------------------
// Set size of smoothing
// --------------------------------------------------
@@ -154,7 +164,7 @@ private:
dsp::decimate::FIRC16xR16x32Decim8 decim_1 { };
dsp::decimate::FIRAndDecimateComplex channel_filter { };
dsp::demodulate::FM demod { };
SmoothVals<float, float> smooth;
SmoothVals<float, float> smooth = { };
AudioOutput audio_output { };

View File

@@ -84,7 +84,7 @@ bool Packet::crc_ok() const {
acars_fcs.process_byte(field_crc.read(i, 8));
}
return (acars_fcs.checksum() == field_crc.read(data_length(), fcs_length));
return (acars_fcs.checksum() == (unsigned)field_crc.read(data_length(), fcs_length));
}
size_t Packet::data_and_fcs_length() const {

View File

@@ -191,7 +191,7 @@ bool Packet::crc_ok() const {
ais_fcs.process_byte(field_crc.read(i, 8));
}
return (ais_fcs.checksum() == field_crc.read(data_length(), fcs_length));
return (ais_fcs.checksum() == (unsigned)field_crc.read(data_length(), fcs_length));
}
size_t Packet::data_and_fcs_length() const {

View File

@@ -259,7 +259,7 @@ private:
bool valid_checksum = false;
uint8_t payload[256];
char address_buffer[15];
uint8_t payload_size;
uint8_t payload_size = 0 ;
Timestamp timestamp_ { };
float parse_lat_str_cmp(const std::string& lat_str){

View File

@@ -40,7 +40,7 @@ Optional<Reading> Packet::reading_fsk_19k2_schrader() const {
case 64:
return Reading {
Reading::Type::FLM_64,
reader_.read(0, 32),
(uint32_t)reader_.read(0, 32),
Pressure { static_cast<int>(reader_.read(32, 8)) * 4 / 3 },
Temperature { static_cast<int>(reader_.read(40, 8) & 0x7f) - 56 }
};
@@ -48,7 +48,7 @@ Optional<Reading> Packet::reading_fsk_19k2_schrader() const {
case 72:
return Reading {
Reading::Type::FLM_72,
reader_.read(0, 32),
(uint32_t)reader_.read(0, 32),
Pressure { static_cast<int>(reader_.read(40, 8)) * 4 / 3 },
Temperature { static_cast<int>(reader_.read(48, 8)) - 56 }
};
@@ -56,7 +56,7 @@ Optional<Reading> Packet::reading_fsk_19k2_schrader() const {
case 80:
return Reading {
Reading::Type::FLM_80,
reader_.read(8, 32),
(uint32_t)reader_.read(8, 32),
Pressure { static_cast<int>(reader_.read(48, 8)) * 4 / 3 },
Temperature { static_cast<int>(reader_.read(56, 8)) - 56 }
};
@@ -85,7 +85,7 @@ Optional<Reading> Packet::reading_ook_8k192_schrader() const {
if( (checksum_calculated & 3) == 3 ) {
return Reading {
Reading::Type::Schrader,
reader_.read(3, 24),
(uint32_t)reader_.read(3, 24),
Pressure { static_cast<int>(reader_.read(27, 8)) * 4 / 3 },
{ },
Flags { static_cast<Flags>((flags << 4) | checksum) }
@@ -122,7 +122,7 @@ Optional<Reading> Packet::reading_ook_8k4_schrader() const {
if( checksum_calculated == checksum ) {
return Reading {
Reading::Type::GMC_96,
id,
(uint32_t)id,
Pressure { static_cast<int>(value_1) * 4 / 3 },
Temperature { static_cast<int>(value_0) - 56 }
};

View File

@@ -39,7 +39,7 @@ namespace tpms {
using Flags = uint8_t;
enum SignalType : uint32_t {
enum SignalType {
FSK_19k2_Schrader = 1,
OOK_8k192_Schrader = 2,
OOK_8k4_Schrader = 3,

View File

@@ -0,0 +1,117 @@
options:
parameters:
author: ''
category: Custom
cmake_opt: ''
comment: ''
copyright: ''
description: ''
gen_cmake: 'On'
gen_linking: dynamic
generate_options: no_gui
hier_block_src_path: '.:'
id: top_block
max_nouts: '0'
output_language: python
placement: (0,0)
qt_qss_theme: ''
realtime_scheduling: ''
run: 'True'
run_command: '{python} -u {filename}'
run_options: run
sizing_mode: fixed
thread_safe_setters: ''
title: ''
window_size: ''
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [8, 8]
rotation: 0
state: enabled
blocks:
- name: blocks_file_sink_0
id: blocks_file_sink
parameters:
affinity: ''
alias: ''
append: 'False'
comment: ''
file: /tmp/foo.cfile
type: complex
unbuffered: 'False'
vlen: '1'
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [632, 140.0]
rotation: 0
state: enabled
- name: blocks_file_source_0
id: blocks_file_source
parameters:
affinity: ''
alias: ''
begin_tag: pmt.PMT_NIL
comment: ''
file: Porpack_Capture.C16
length: '0'
maxoutbuf: '0'
minoutbuf: '0'
offset: '0'
repeat: 'False'
type: short
vlen: '1'
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [64, 124.0]
rotation: 0
state: enabled
- name: blocks_interleaved_short_to_complex_0
id: blocks_interleaved_short_to_complex
parameters:
affinity: ''
alias: ''
comment: ''
maxoutbuf: '0'
minoutbuf: '0'
swap: 'False'
vector_input: 'False'
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [272, 156.0]
rotation: 0
state: enabled
- name: blocks_multiply_const_vxx_0
id: blocks_multiply_const_vxx
parameters:
affinity: ''
alias: ''
comment: ''
const: ' 1.0 / 32768.0'
maxoutbuf: '0'
minoutbuf: '0'
type: complex
vlen: '1'
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [448, 156.0]
rotation: 0
state: true
connections:
- [blocks_file_source_0, '0', blocks_interleaved_short_to_complex_0, '0']
- [blocks_interleaved_short_to_complex_0, '0', blocks_multiply_const_vxx_0, '0']
- [blocks_multiply_const_vxx_0, '0', blocks_file_sink_0, '0']
metadata:
file_format: 1