only:Improve toolset for default tune canned tune generation #4871

This commit is contained in:
Andrey 2023-06-16 21:44:29 -04:00
parent 4fe7e4138b
commit e49abab407
2 changed files with 9 additions and 0 deletions

View File

@ -75,6 +75,13 @@ jobs:
exit 1
fi
- name: Push fresh default tune
if: ${{env.NOCOMMIT != 'true'}}
uses: ad-m/github-push-action@master
with:
github_token: ${{ github.token }}
branch: ${{ steps.extract_branch.outputs.branch }}
- name: Upload Linux built simulator
uses: actions/upload-artifact@v3
with:

View File

@ -88,6 +88,8 @@ static void runCanGpioTest() {
static void writeSimulatorTune() {
FILE *ptr = fopen(SIMULATOR_TUNE_BIN_FILE_NAME, "wb");
if (ptr == nullptr)
throw std::logic_error("Error opening file maybe folder needs to be created?");
fwrite(&persistentState.persistentConfiguration, 1, sizeof(persistentState.persistentConfiguration), ptr);
fclose(ptr);
}