kopia lustrzana https://github.com/piotr022/UV_K5_playground
workflow-updates
rodzic
78e9310105
commit
febea868d8
|
@ -36,7 +36,11 @@ jobs:
|
|||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_PROJECT_rssi_printer_encoded:BOOL=ON
|
||||
|
||||
- name: Build
|
||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target rssi_printer_encoded
|
||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target rssi_printer_encoded rssi_sbar_encoded pong_encoded most_useless_mod_encoded
|
||||
|
||||
- name: Get the date
|
||||
id: date
|
||||
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
|
||||
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
|
@ -44,12 +48,12 @@ jobs:
|
|||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ format('release-{0}', github.run_id) }}
|
||||
release_name: Release ${{ format('release-{0}', github.run_id) }}
|
||||
tag_name: ${{ format('release-{0}', github.run_number) }}
|
||||
release_name: ${{ format('Release #{0} for Project, {1}', github.run_number, steps.date.outputs.date) }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
|
||||
- name: Upload Release Asset
|
||||
- name: Upload Release Asset rssi_printer_encoded
|
||||
uses: actions/upload-release-asset@v1.0.2
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
@ -58,3 +62,33 @@ jobs:
|
|||
asset_path: ${{github.workspace}}/build/src/rssi_printer/rssi_printer_encoded.bin
|
||||
asset_name: uv_k5_01_26_rssi_printer_encoded.bin
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
- name: Upload Release Asset rssi_sbar_encoded
|
||||
uses: actions/upload-release-asset@v1.0.2
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ${{github.workspace}}/build/src/rssi_sbar/rssi_sbar_encoded.bin
|
||||
asset_name: uv_k5_01_26_rssi_sbar_encoded.bin
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
- name: Upload Release Asset pong_encoded
|
||||
uses: actions/upload-release-asset@v1.0.2
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ${{github.workspace}}/build/src/pong/pong_encoded.bin
|
||||
asset_name: uv_k5_01_26_pong_encoded.bin
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
- name: Upload Release Asset most_useless_mod_encoded
|
||||
uses: actions/upload-release-asset@v1.0.2
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ${{github.workspace}}/build/src/most_useless_mod/most_useless_mod_encoded.bin
|
||||
asset_name: uv_k5_01_26_most_useless_mod_encoded.bin
|
||||
asset_content_type: application/octet-stream
|
||||
|
|
|
@ -69,8 +69,10 @@ namespace System
|
|||
|
||||
inline const TOrgData OrgData_01_26 =
|
||||
{
|
||||
.pDisplayBuffer = (decltype(TOrgData::pDisplayBuffer)) 0x20000704-128,
|
||||
.pDisplayBuffer = (decltype(TOrgData::pDisplayBuffer)) 0x20000704,
|
||||
.pSmallDigs = (decltype(TOrgData::pSmallDigs)) 0xD620,
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
extern "C" void __libc_init_array();
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
#include "lcd.hpp"
|
||||
|
||||
struct TUV_K5Display : public IBitmap<128, 64, 8>
|
||||
struct TUV_K5Display : public IBitmap<128, 56, 8>
|
||||
{
|
||||
constexpr TUV_K5Display(const unsigned char* p8ScreenData) : IBitmap(p8ScreenData){};
|
||||
bool GetPixel(unsigned char u8X, unsigned char u8Y) const override
|
||||
|
@ -13,7 +13,13 @@ struct TUV_K5Display : public IBitmap<128, 64, 8>
|
|||
{
|
||||
unsigned char u8Line = u8Y / LineHeight;
|
||||
unsigned char* pStart = (unsigned char*)pBuffStart;
|
||||
*(pStart + GetCoursorPosition(u8Line, u8X)) |= 0b1 << (u8Y % LineHeight);
|
||||
auto Position = GetCoursorPosition(u8Line, u8X);
|
||||
if(Position > (SizeY / LineHeight) * SizeX)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
*(pStart + Position) |= 0b1 << (u8Y % LineHeight);
|
||||
}
|
||||
|
||||
void* GetCoursorData(unsigned short u16CoursorPosition) const override
|
||||
|
|
|
@ -15,24 +15,23 @@ public:
|
|||
void Handle()
|
||||
{
|
||||
DisplayBuff.ClearAll();
|
||||
// char C8RssiString[] = "g000";
|
||||
char C8RssiString[] = "000";
|
||||
|
||||
unsigned int u32Key = Fw.PollKeyboard();
|
||||
|
||||
// C8RssiString[1] = '0' + (u32Key / 100) % 10;
|
||||
// C8RssiString[2] = '0' + (u32Key / 10) % 10;
|
||||
// C8RssiString[3] = '0' + u32Key % 10;
|
||||
C8RssiString[0] = '0' + (u32Key / 100);
|
||||
C8RssiString[1] = '0' + (u32Key / 10) % 10;
|
||||
C8RssiString[2] = '0' + u32Key % 10;
|
||||
|
||||
Game.handle(u32Key);
|
||||
auto const BallPosition = Game.getBallPosition();
|
||||
auto const PlatformPosition = Game.getPlatformPosition();
|
||||
|
||||
|
||||
Display.DrawCircle(BallPosition.x, BallPosition.y, 4, true);
|
||||
Display.DrawRectangle(PlatformPosition.x, PlatformPosition.y, 6, 20, 20);
|
||||
Display.SetCoursor(3, 0);
|
||||
// Display.SetFont(&FontSmallNr);
|
||||
// Display.Print(C8RssiString);
|
||||
Display.DrawRectangle(BallPosition.x, BallPosition.y, 7, 7, true);
|
||||
Display.DrawRectangle(PlatformPosition.x, PlatformPosition.y, 6, 20, true);
|
||||
Display.SetCoursor(0, 0);
|
||||
Display.SetFont(&FontSmallNr);
|
||||
Display.Print(C8RssiString);
|
||||
Fw.FlushFramebufferToScreen();
|
||||
}
|
||||
|
||||
|
|
|
@ -3,21 +3,6 @@
|
|||
.fpu softvfp
|
||||
.thumb
|
||||
|
||||
.global g_pfnVectors
|
||||
.global Default_Handler
|
||||
|
||||
/* start address for the initialization values of the .data section.
|
||||
defined in linker script */
|
||||
.word _sidata
|
||||
/* start address for the .data section. defined in linker script */
|
||||
.word _sdata
|
||||
/* end address for the .data section. defined in linker script */
|
||||
.word _edata
|
||||
/* start address for the .bss section. defined in linker script */
|
||||
.word _sbss
|
||||
/* end address for the .bss section. defined in linker script */
|
||||
.word _ebss
|
||||
|
||||
.section .text.Reset_Handler
|
||||
.weak Reset_Handler
|
||||
.type Reset_Handler, %function
|
||||
|
@ -25,46 +10,9 @@ Reset_Handler:
|
|||
ldr r0, =_estack
|
||||
mov sp, r0 /* set stack pointer */
|
||||
|
||||
/* Copy the data segment initializers from flash to SRAM */
|
||||
ldr r0, =_sdata
|
||||
ldr r1, =_edata
|
||||
ldr r2, =_sidata
|
||||
movs r3, #0
|
||||
b LoopCopyDataInit
|
||||
|
||||
CopyDataInit:
|
||||
ldr r4, [r2, r3]
|
||||
str r4, [r0, r3]
|
||||
adds r3, r3, #4
|
||||
|
||||
LoopCopyDataInit:
|
||||
adds r4, r0, r3
|
||||
cmp r4, r1
|
||||
bcc CopyDataInit
|
||||
|
||||
/* Zero fill the bss segment. */
|
||||
ldr r2, =_sbss
|
||||
ldr r4, =_ebss
|
||||
movs r3, #0
|
||||
b LoopFillZerobss
|
||||
|
||||
FillZerobss:
|
||||
str r3, [r2]
|
||||
adds r2, r2, #4
|
||||
|
||||
LoopFillZerobss:
|
||||
cmp r2, r4
|
||||
bcc FillZerobss
|
||||
|
||||
/* Call the clock system intitialization function.*/
|
||||
/* bl SystemInit */
|
||||
/* Call static constructors */
|
||||
@bl __libc_init_array
|
||||
/* Call the application's entry point.*/
|
||||
bl main
|
||||
|
||||
LoopForever:
|
||||
b LoopForever
|
||||
|
||||
|
||||
.size Reset_Handler, .-Reset_Handler
|
||||
|
|
|
@ -17,9 +17,16 @@ int main()
|
|||
|
||||
void MultiIrq_Handler(unsigned int u32IrqSource)
|
||||
{
|
||||
static bool bFirstInit = false;
|
||||
if(!bFirstInit)
|
||||
{
|
||||
System::CopyDataSection();
|
||||
__libc_init_array();
|
||||
bFirstInit = true;
|
||||
}
|
||||
|
||||
static unsigned int u32StupidCounter = 1;
|
||||
//GPIOA->DATA & GPIO_PIN_3
|
||||
if((!(u32StupidCounter++ % 1) && u32StupidCounter > 200)) // exit key
|
||||
if((!(u32StupidCounter++ % 15) && u32StupidCounter > 200)) // exit key
|
||||
{
|
||||
CRssiPrinter::Handle(Fw, FwData);
|
||||
}
|
||||
|
|
|
@ -33,25 +33,28 @@ SECTIONS
|
|||
|
||||
.text :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
*(.text)
|
||||
*(.text*)
|
||||
*(.rodata)
|
||||
*(.rodata*)
|
||||
KEEP (*(.init))
|
||||
KEEP (*(.fini))
|
||||
. = ALIGN(4);
|
||||
} >FLASH
|
||||
|
||||
.preinit_array :
|
||||
{
|
||||
PROVIDE_HIDDEN (__preinit_array_start = .);
|
||||
__preinit_array_start = .;
|
||||
KEEP (*(.preinit_array*))
|
||||
PROVIDE_HIDDEN (__preinit_array_end = .);
|
||||
__preinit_array_end = .;
|
||||
} >FLASH
|
||||
.init_array :
|
||||
{
|
||||
PROVIDE_HIDDEN (__init_array_start = .);
|
||||
__init_array_start = .;
|
||||
KEEP (*(SORT(.init_array.*)))
|
||||
KEEP (*(.init_array*))
|
||||
PROVIDE_HIDDEN (__init_array_end = .);
|
||||
__init_array_end = .;
|
||||
} >FLASH
|
||||
.fini_array :
|
||||
{
|
||||
|
|
|
@ -21,7 +21,7 @@ class CRssiPrinter
|
|||
return;
|
||||
}
|
||||
|
||||
auto* pMenuCheckData = (unsigned char*)DisplayBuff.GetCoursorData(DisplayBuff.GetCoursorPosition(3, 6*8 + 1));
|
||||
auto* pMenuCheckData = (unsigned char*)DisplayBuff.GetCoursorData(DisplayBuff.GetCoursorPosition(2, 6*8 + 1));
|
||||
if(Fw.BK4819Read(0x0C) & 0b10)
|
||||
{
|
||||
u8SqlDelayCnt = 0;
|
||||
|
@ -32,7 +32,7 @@ class CRssiPrinter
|
|||
if(!bIsCleared)
|
||||
{
|
||||
bIsCleared = true;
|
||||
auto* pDData = (unsigned char*)DisplayBuff.GetCoursorData(DisplayBuff.GetCoursorPosition(4, 0));
|
||||
auto* pDData = (unsigned char*)DisplayBuff.GetCoursorData(DisplayBuff.GetCoursorPosition(3, 0));
|
||||
memset(pDData, 0, DisplayBuff.SizeX);
|
||||
memset(U8ScreenHistory, 0, sizeof(U8ScreenHistory));
|
||||
u8ChartPosition = 0;
|
||||
|
@ -48,7 +48,7 @@ class CRssiPrinter
|
|||
u8SqlDelayCnt++;
|
||||
bIsCleared = false;
|
||||
|
||||
Display.SetCoursor(4, 0);
|
||||
Display.SetCoursor(3, 0);
|
||||
Display.SetFont(&FontSmallNr);
|
||||
|
||||
char C8RssiString[] = "g000";
|
||||
|
@ -92,7 +92,7 @@ class CRssiPrinter
|
|||
}
|
||||
}
|
||||
|
||||
auto* pDData = (unsigned char*)DisplayBuff.GetCoursorData(DisplayBuff.GetCoursorPosition(4, 0) + ChartStartX);
|
||||
auto* pDData = (unsigned char*)DisplayBuff.GetCoursorData(DisplayBuff.GetCoursorPosition(3, 0) + ChartStartX);
|
||||
memcpy(pDData, U8ScreenHistory, sizeof(U8ScreenHistory));
|
||||
|
||||
u8ChartPosition++;
|
||||
|
|
|
@ -3,21 +3,6 @@
|
|||
.fpu softvfp
|
||||
.thumb
|
||||
|
||||
.global g_pfnVectors
|
||||
.global Default_Handler
|
||||
|
||||
/* start address for the initialization values of the .data section.
|
||||
defined in linker script */
|
||||
.word _sidata
|
||||
/* start address for the .data section. defined in linker script */
|
||||
.word _sdata
|
||||
/* end address for the .data section. defined in linker script */
|
||||
.word _edata
|
||||
/* start address for the .bss section. defined in linker script */
|
||||
.word _sbss
|
||||
/* end address for the .bss section. defined in linker script */
|
||||
.word _ebss
|
||||
|
||||
.section .text.Reset_Handler
|
||||
.weak Reset_Handler
|
||||
.type Reset_Handler, %function
|
||||
|
@ -25,46 +10,9 @@ Reset_Handler:
|
|||
ldr r0, =_estack
|
||||
mov sp, r0 /* set stack pointer */
|
||||
|
||||
/* Copy the data segment initializers from flash to SRAM */
|
||||
ldr r0, =_sdata
|
||||
ldr r1, =_edata
|
||||
ldr r2, =_sidata
|
||||
movs r3, #0
|
||||
b LoopCopyDataInit
|
||||
|
||||
CopyDataInit:
|
||||
ldr r4, [r2, r3]
|
||||
str r4, [r0, r3]
|
||||
adds r3, r3, #4
|
||||
|
||||
LoopCopyDataInit:
|
||||
adds r4, r0, r3
|
||||
cmp r4, r1
|
||||
bcc CopyDataInit
|
||||
|
||||
/* Zero fill the bss segment. */
|
||||
ldr r2, =_sbss
|
||||
ldr r4, =_ebss
|
||||
movs r3, #0
|
||||
b LoopFillZerobss
|
||||
|
||||
FillZerobss:
|
||||
str r3, [r2]
|
||||
adds r2, r2, #4
|
||||
|
||||
LoopFillZerobss:
|
||||
cmp r2, r4
|
||||
bcc FillZerobss
|
||||
|
||||
/* Call the clock system intitialization function.*/
|
||||
/* bl SystemInit */
|
||||
/* Call static constructors */
|
||||
@bl __libc_init_array
|
||||
/* Call the application's entry point.*/
|
||||
bl main
|
||||
|
||||
LoopForever:
|
||||
b LoopForever
|
||||
|
||||
|
||||
.size Reset_Handler, .-Reset_Handler
|
||||
|
|
|
@ -17,8 +17,15 @@ int main()
|
|||
|
||||
void MultiIrq_Handler(unsigned int u32IrqSource)
|
||||
{
|
||||
static bool bFirstInit = false;
|
||||
if(!bFirstInit)
|
||||
{
|
||||
System::CopyDataSection();
|
||||
__libc_init_array();
|
||||
bFirstInit = true;
|
||||
}
|
||||
|
||||
static unsigned int u32StupidCounter = 1;
|
||||
//GPIOA->DATA & GPIO_PIN_3
|
||||
if((!(u32StupidCounter++ % 15) && u32StupidCounter > 200)) // exit key
|
||||
{
|
||||
CRssiPrinter::Handle(Fw, FwData);
|
||||
|
|
|
@ -33,25 +33,28 @@ SECTIONS
|
|||
|
||||
.text :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
*(.text)
|
||||
*(.text*)
|
||||
*(.rodata)
|
||||
*(.rodata*)
|
||||
KEEP (*(.init))
|
||||
KEEP (*(.fini))
|
||||
. = ALIGN(4);
|
||||
} >FLASH
|
||||
|
||||
.preinit_array :
|
||||
{
|
||||
PROVIDE_HIDDEN (__preinit_array_start = .);
|
||||
__preinit_array_start = .;
|
||||
KEEP (*(.preinit_array*))
|
||||
PROVIDE_HIDDEN (__preinit_array_end = .);
|
||||
__preinit_array_end = .;
|
||||
} >FLASH
|
||||
.init_array :
|
||||
{
|
||||
PROVIDE_HIDDEN (__init_array_start = .);
|
||||
__init_array_start = .;
|
||||
KEEP (*(SORT(.init_array.*)))
|
||||
KEEP (*(.init_array*))
|
||||
PROVIDE_HIDDEN (__init_array_end = .);
|
||||
__init_array_end = .;
|
||||
} >FLASH
|
||||
.fini_array :
|
||||
{
|
||||
|
|
Ładowanie…
Reference in New Issue