mirror of
https://github.com/openshwprojects/OpenBK7231T_App.git
synced 2025-10-29 19:43:22 +00:00
add sim bin - test
* Update workflow.yaml * Update README.md * Update new_pins.h * Update workflow.yaml * Update workflow.yaml * fx * fx * fx * rellll * fix * fix errors * ddddddd * qqq * fx * tr * w * s * tr * tr * tr * tr * tr * tr * tr * tr1 * tr * tr * test * tr * tr3 * fix * tr1 * Update workflow.yaml * dlls * tr * tr * needs * flat * tr
This commit is contained in:
parent
afa7b8a932
commit
23cf6c59d0
33
.github/workflows/workflow.yaml
vendored
33
.github/workflows/workflow.yaml
vendored
@ -58,6 +58,39 @@ jobs:
|
||||
echo "::set-output name=short_ref::${BRANCHTRANSLATED}"
|
||||
echo "::set-output name=sha_short::SHA-$(git rev-parse --short=12 HEAD)"
|
||||
echo "::set-output name=version::${VERSION}"
|
||||
build2:
|
||||
name: Build Simulator
|
||||
needs: refs
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup MSBuild
|
||||
uses: microsoft/setup-msbuild@v1.0.2
|
||||
|
||||
- name: Checkout simulator repository
|
||||
run: |
|
||||
git clone https://github.com/openshwprojects/obkSimulator
|
||||
mkdir -p ./libs_for_simulator
|
||||
cp -r ./obkSimulator/simulator/libs_for_simulator/* ./libs_for_simulator
|
||||
|
||||
- name: Build project
|
||||
run: msbuild openBeken_win32_mvsc2017.vcxproj /p:Configuration=Release /p:PlatformToolset=v143
|
||||
- name: Flatten build assets
|
||||
run: |
|
||||
mkdir -p flat
|
||||
cp ./Release/openBeken_win32.exe flat/
|
||||
cp ./obkSimulator/simulator/*.dll flat/
|
||||
- name: Compress build assets
|
||||
run: |
|
||||
Compress-Archive -Path flat/* -DestinationPath obkSimulator_win32_${{ needs.refs.outputs.version }}.zip
|
||||
- name: Upload build assets
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: obkSimulator_win32_${{ needs.refs.outputs.version }}
|
||||
path: obkSimulator_win32_${{ needs.refs.outputs.version }}.zip
|
||||
build:
|
||||
name: Build
|
||||
needs: refs
|
||||
|
||||
BIN
Release Win32/openBeken_win32.exp
Normal file
BIN
Release Win32/openBeken_win32.exp
Normal file
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -338,6 +338,9 @@
|
||||
<ClCompile Include="src\driver\drv_spiLED.c" />
|
||||
<ClCompile Include="src\driver\drv_sm15155e.c" />
|
||||
<ClCompile Include="src\selftest\selftest_demo_signAndValue.c" />
|
||||
<ClCompile Include="src\driver\drv_charts.c" />
|
||||
<ClCompile Include="src\driver\drv_test_charts.c" />
|
||||
<ClCompile Include="src\sim\Controller_Switch.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="src\base64\base64.h" />
|
||||
@ -491,6 +494,7 @@
|
||||
<ClInclude Include="src\obk_config.h" />
|
||||
<ClInclude Include="src\sim\Controller_WS2812.h" />
|
||||
<ClInclude Include="src\driver\drv_spiLED.h" />
|
||||
<ClInclude Include="src\sim\Controller_Switch.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="..\..\platforms\bk7231t\bk7231t_os\beken378\func\include\net_param_pub.h" />
|
||||
|
||||
@ -563,7 +563,7 @@ void CMD_InitChannelCommands(){
|
||||
//cmddetail:"fn":"SetChannelEnum","file":"cmnds/cmd_channels.c","requires":"",
|
||||
//cmddetail:"examples":""}
|
||||
#if WINDOWS
|
||||
CMD_RegisterCommand("SetChannelEnum", CMD_SetChannelEnum, NULL);
|
||||
///CMD_RegisterCommand("SetChannelEnum", CMD_SetChannelEnum, NULL);
|
||||
#endif
|
||||
//cmddetail:{"name":"SetChannelLabel","args":"[ChannelIndex][Str][bHideTogglePrefix]",
|
||||
//cmddetail:"descr":"Sets a channel label for UI and default entity name for Home Assistant discovery. If you use 1 for bHideTogglePrefix, then the 'Toggle ' prefix from UI button will be omitted",
|
||||
|
||||
@ -3,6 +3,8 @@
|
||||
#include "new_common.h"
|
||||
#include "hal/hal_wifi.h"
|
||||
|
||||
#define test12321321 321321321
|
||||
|
||||
typedef enum ioRole_e {
|
||||
//iodetail:{"name":"None",
|
||||
//iodetail:"title":"TODO",
|
||||
|
||||
@ -10,63 +10,63 @@ void Test_ExpandConstant() {
|
||||
// reset whole device
|
||||
SIM_ClearOBK(0);
|
||||
|
||||
CMD_ExpandConstantsWithinString("Hello", buffer, sizeof(buffer), 0);
|
||||
CMD_ExpandConstantsWithinString("Hello", buffer, sizeof(buffer));
|
||||
SELFTEST_ASSERT_STRING(buffer, "Hello");
|
||||
|
||||
|
||||
CHANNEL_Set(1, 123, 0);
|
||||
CMD_ExpandConstantsWithinString("$CH1", buffer,sizeof(buffer), 0);
|
||||
CMD_ExpandConstantsWithinString("$CH1", buffer,sizeof(buffer));
|
||||
SELFTEST_ASSERT_STRING(buffer, "123");
|
||||
|
||||
CHANNEL_Set(1, 456, 0);
|
||||
CMD_ExpandConstantsWithinString("$CH1", buffer, sizeof(buffer), 0);;
|
||||
CMD_ExpandConstantsWithinString("$CH1", buffer, sizeof(buffer));;
|
||||
SELFTEST_ASSERT_STRING(buffer, "456");
|
||||
|
||||
CHANNEL_Set(11, 2022, 0);
|
||||
// must be able to tell whether it's $CH11 or a $CH1
|
||||
CMD_ExpandConstantsWithinString("$CH11", buffer, sizeof(buffer), 0);
|
||||
CMD_ExpandConstantsWithinString("$CH11", buffer, sizeof(buffer));
|
||||
SELFTEST_ASSERT_STRING(buffer, "2022");
|
||||
|
||||
CMD_ExpandConstantsWithinString("$CH1", buffer, sizeof(buffer), 0);
|
||||
CMD_ExpandConstantsWithinString("$CH1", buffer, sizeof(buffer));
|
||||
SELFTEST_ASSERT_STRING(buffer, "456");
|
||||
|
||||
// must be able to tell whether it's $CH11 or a $CH1 - with a suffix
|
||||
CMD_ExpandConstantsWithinString("$CH11ba", buffer, sizeof(buffer), 0);
|
||||
CMD_ExpandConstantsWithinString("$CH11ba", buffer, sizeof(buffer));
|
||||
SELFTEST_ASSERT_STRING(buffer, "2022ba");
|
||||
|
||||
CMD_ExpandConstantsWithinString("$CH1ba", buffer, sizeof(buffer), 0);
|
||||
CMD_ExpandConstantsWithinString("$CH1ba", buffer, sizeof(buffer));
|
||||
SELFTEST_ASSERT_STRING(buffer, "456ba");
|
||||
|
||||
// must be able to tell whether it's $CH11 or a $CH1 - with a prefix
|
||||
CMD_ExpandConstantsWithinString("ba$CH11", buffer, sizeof(buffer), 0);
|
||||
CMD_ExpandConstantsWithinString("ba$CH11", buffer, sizeof(buffer));
|
||||
SELFTEST_ASSERT_STRING(buffer, "ba2022");
|
||||
|
||||
CMD_ExpandConstantsWithinString("ba$CH1", buffer, sizeof(buffer), 0);
|
||||
CMD_ExpandConstantsWithinString("ba$CH1", buffer, sizeof(buffer));
|
||||
SELFTEST_ASSERT_STRING(buffer, "ba456");
|
||||
|
||||
// must be able to tell whether it's $CH11 or a $CH1 - with a prefix and a suffix
|
||||
CMD_ExpandConstantsWithinString("ba$CH11ha", buffer, sizeof(buffer), 0);
|
||||
CMD_ExpandConstantsWithinString("ba$CH11ha", buffer, sizeof(buffer));
|
||||
SELFTEST_ASSERT_STRING(buffer, "ba2022ha");
|
||||
|
||||
CMD_ExpandConstantsWithinString("ba$CH1ha", buffer, sizeof(buffer), 0);
|
||||
CMD_ExpandConstantsWithinString("ba$CH1ha", buffer, sizeof(buffer));
|
||||
SELFTEST_ASSERT_STRING(buffer, "ba456ha");
|
||||
|
||||
CMD_ExpandConstantsWithinString("ba$CH1$CH1ha", buffer, sizeof(buffer), 0);
|
||||
CMD_ExpandConstantsWithinString("ba$CH1$CH1ha", buffer, sizeof(buffer));
|
||||
SELFTEST_ASSERT_STRING(buffer, "ba456456ha");
|
||||
|
||||
CMD_ExpandConstantsWithinString("$CH1$CH1ha", buffer, sizeof(buffer), 0);
|
||||
CMD_ExpandConstantsWithinString("$CH1$CH1ha", buffer, sizeof(buffer));
|
||||
SELFTEST_ASSERT_STRING(buffer, "456456ha");
|
||||
|
||||
CMD_ExpandConstantsWithinString("$CH1$CH1", buffer, sizeof(buffer), 0);
|
||||
CMD_ExpandConstantsWithinString("$CH1$CH1", buffer, sizeof(buffer));
|
||||
SELFTEST_ASSERT_STRING(buffer, "456456");
|
||||
|
||||
// check buffer len truncating
|
||||
CMD_ExpandConstantsWithinString("Hello long one!", smallBuffer, sizeof(smallBuffer), 0);
|
||||
CMD_ExpandConstantsWithinString("Hello long one!", smallBuffer, sizeof(smallBuffer));
|
||||
// Buffer was too short - text truncated!
|
||||
SELFTEST_ASSERT_STRING(smallBuffer, "Hello l");
|
||||
|
||||
|
||||
//CMD_ExpandConstantsWithinString("Hello $CH1", smallBuffer, sizeof(smallBuffer), 0);
|
||||
//CMD_ExpandConstantsWithinString("Hello $CH1", smallBuffer, sizeof(smallBuffer));
|
||||
// Buffer was too short - text truncated!
|
||||
//SELFTEST_ASSERT_STRING(smallBuffer, "Hello 4");
|
||||
// NOTE: it won't work like that because of the sprintf behaviour....
|
||||
@ -115,7 +115,6 @@ void Test_ExpandConstant() {
|
||||
free(ptr);
|
||||
//system("pause");
|
||||
|
||||
|
||||
CFG_SetFlag(OBK_FLAG_HTTP_PINMONITOR, 0);
|
||||
ptr = CMD_ExpandingStrdup("$FLAG13");
|
||||
SELFTEST_ASSERT_STRING(ptr, "0");
|
||||
|
||||
@ -130,7 +130,7 @@ void SIM_ClearOBK(const char *flashPath) {
|
||||
Main_Init();
|
||||
}
|
||||
void Win_DoUnitTests() {
|
||||
Test_Enums();
|
||||
//Test_Enums();
|
||||
Test_Backlog();
|
||||
Test_DoorSensor();
|
||||
Test_WS2812B();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user