Porównaj commity

...

8 Commity

Autor SHA1 Wiadomość Data
Arjan te Marvelde 896a214cfa
Merge pull request #13 from howard0su/patch-1
Add -Wall to compile options
2022-12-14 20:23:32 +01:00
Arjan te Marvelde eed75e6f5a
Merge pull request #15 from howard0su/typo
Fix typo in dsp_fft
2022-12-14 20:21:23 +01:00
Arjan te Marvelde 7aae94bb2c
Merge pull request #16 from howard0su/warnings
Use variable char array instead of fixed size
2022-12-14 20:20:57 +01:00
Arjan te Marvelde ed89e5ccd1
Merge pull request #18 from howard0su/cicd
Add cicd pipeline to validate the build
2022-12-14 20:20:06 +01:00
Howard Su fe48c40fb8 Add cicd pipeline to validate the build 2022-12-14 11:39:01 +08:00
Howard Su 2af6184d37 Fix typo in dsp_fft 2022-12-12 23:54:28 +08:00
Howard Su b039129393 Use variable char array instead of fixed size 2022-12-12 23:52:36 +08:00
Howard Su e7d90ea151
Add -Wall to compile options 2022-12-12 09:27:58 +08:00
4 zmienionych plików z 58 dodań i 9 usunięć

48
.github/workflows/cmake.yml vendored 100644
Wyświetl plik

@ -0,0 +1,48 @@
name: CMake
on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches:
- main
pull_request:
branches:
- main
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
PICO_SDK_FETCH_FROM_GIT: 1
jobs:
build-firmware:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest
name: build-frmware
steps:
- uses: actions/checkout@v2
- name: Install libs
# Some projects don't allow in-source building, so create a separate build directory
# We'll use this as our working directory for all subsequent commands
run: sudo apt-get install -y gcc-arm-none-eabi
- name: Create Build Environment
shell: bash
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE
- name: Build firmware
working-directory: ${{runner.workspace}}/build
shell: bash
run: cmake --build .

Wyświetl plik

@ -11,7 +11,7 @@ set(CMAKE_CXX_STANDARD 17)
# initalize pico_sdk from installed location
# (note this can come from environment, CMake cache etc)
set(PICO_SDK_PATH "C:/Users/Arjan/Documents/Pico/pico-sdk")
# set(PICO_SDK_PATH "C:/Users/Arjan/Documents/Pico/pico-sdk")
# Pull in Raspberry Pi Pico SDK (must be before project)
include(pico_sdk_import.cmake)
@ -32,6 +32,7 @@ pico_sdk_init()
# relay.c Switching for the band filter and attenuator relays
add_executable(uSDR-FFT uSDR.c lcd.c si5351.c dsp.c fix_fft.c hmi.c monitor.c relay.c)
target_compile_options(uSDR-FFT PRIVATE -Wall)
pico_set_program_name(uSDR-FFT "uSDR-FFT")
pico_set_program_version(uSDR-FFT "0.1")

Wyświetl plik

@ -316,7 +316,7 @@ bool __not_in_flash_func(tx)(void)
xqp = &XQ_buf[0];
for (i=0; i<BUFSIZE; i++)
{
*xip++ = *ip++;
*xip++ = *ap++;
*xqp++ = 0;
}
if (++b > 2) b = 0; // Point to New Saved sample buffer
@ -324,7 +324,7 @@ bool __not_in_flash_func(tx)(void)
xqp = &XQ_buf[BUFSIZE];
for (i=0; i<BUFSIZE; i++)
{
*xip++ = *ip++;
*xip++ = *ap++;
*xqp++ = 0;
}

12
hmi.c
Wyświetl plik

@ -101,12 +101,12 @@
#define HMI_NVOX 4
#define HMI_NBPF 5
char hmi_noption[HMI_NSTATES] = {HMI_NTUNE, HMI_NMODE, HMI_NAGC, HMI_NPRE, HMI_NVOX, HMI_NBPF};
char hmi_o_menu[HMI_NSTATES][8] = {"Tune","Mode","AGC","Pre","VOX"}; // Indexed by hmi_state
char hmi_o_mode[HMI_NMODE][8] = {"USB","LSB","AM ","CW "}; // Indexed by hmi_sub[HMI_S_MODE]
char hmi_o_agc [HMI_NAGC][8] = {"NoGC","Slow","Fast"}; // Indexed by hmi_sub[HMI_S_AGC]
char hmi_o_pre [HMI_NPRE][8] = {"-30dB","-20dB","-10dB"," 0dB","+10dB"}; // Indexed by hmi_sub[HMI_S_PRE]
char hmi_o_vox [HMI_NVOX][8] = {"NoVOX","VOX-L","VOX-M","VOX-H"}; // Indexed by hmi_sub[HMI_S_VOX]
char hmi_o_bpf [HMI_NBPF][8] = {"<2.5","2-6","5-12","10-24","20-40"}; // Indexed by
const char* hmi_o_menu[HMI_NSTATES] = {"Tune","Mode","AGC","Pre","VOX"}; // Indexed by hmi_state
const char* hmi_o_mode[HMI_NMODE] = {"USB","LSB","AM ","CW "}; // Indexed by hmi_sub[HMI_S_MODE]
const char* hmi_o_agc [HMI_NAGC] = {"NoGC","Slow","Fast"}; // Indexed by hmi_sub[HMI_S_AGC]
const char* hmi_o_pre [HMI_NPRE] = {"-30dB","-20dB","-10dB"," 0dB","+10dB"}; // Indexed by hmi_sub[HMI_S_PRE]
const char* hmi_o_vox [HMI_NVOX] = {"NoVOX","VOX-L","VOX-M","VOX-H"}; // Indexed by hmi_sub[HMI_S_VOX]
const char* hmi_o_bpf [HMI_NBPF] = {"<2.5","2-6","5-12","10-24","20-40"}; // Indexed by hmi_sub[HMI_S_BPF]
// Map option to setting
int hmi_mode[HMI_NMODE] = {MODE_USB, MODE_LSB, MODE_AM, MODE_CW};