Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added version command to improve bug management and issue tracking #74

Merged
merged 1 commit into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/release_rddl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ jobs:
git tag ${{ github.event.inputs.tag }}
git push origin ${{ github.event.inputs.tag }}

- name: Define source code Tag version
run: |
sed -i 's/rddl-v0.0.0/${{ github.event.inputs.tag }}/' tasmota/user_config_override_sample.h

- name: Detele potentially existing cache
run: rm -rf .cache

Expand Down
1 change: 1 addition & 0 deletions tasmota/include/i18n.h
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@
#define D_CMND_NOTARIZE "Notarize"
#define D_CMND_REMOVE_FILES "RemoveFiles"
#define D_CMND_CIDSTOBEQUERIED "CIDsToBeQueried"
#define D_CMND_VERSION "Version"
#define D_CMND_STATUS "Status"
#define D_STATUS1_PARAMETER "PRM"
#define D_STATUS2_FIRMWARE "FWR"
Expand Down
10 changes: 9 additions & 1 deletion tasmota/tasmota_support/support_command.ino
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ const char kTasmotaCommands[] PROGMEM = "|" // No prefix
D_CMND_PLANETMINTCHAINID "|" D_CMND_MACHINEDATA "|" D_CMND_POPCHALLENGE "|" D_CMND_ATTESTMACHINE "|"
D_CMND_NOTARIZATION_PERIODICITY "|" D_CMND_NOTARIZE "|" D_CMND_REMOVE_FILES "|" D_CMND_POPINIT "|"
D_CMND_CHALLENGE "|" D_CMND_POPCHALLENGERESULT "|" D_CMND_REDEEMCLAIMS "|" D_CMND_CREATEACCOUNT "|" D_CMND_CIDSTOBEQUERIED "|"
D_CMND_VERSION "|"
#ifdef USE_I2C
D_CMND_I2CSCAN "|" D_CMND_I2CDRIVER "|"
#endif
Expand Down Expand Up @@ -93,6 +94,7 @@ void (* const TasmotaCommand[])(void) PROGMEM = {
&CmndPlanetmintChainID, &CmndMachineData, &CmndPoPChallenge, &CmndAttestMachine,
&CmndNotarizationPeriodicity, &CmndNotarize, &CmndRemoveFiles, &CmndPoPInit,
&CmndChallenge, &CmndPoPChallengeResult, &CmndRedeemClaims, &CmndCreateAccount, &CmndCIDsToBeQueried,
&CmndVersion,
#ifdef USE_I2C
&CmndI2cScan, &CmndI2cDriver,
#endif
Expand Down Expand Up @@ -979,7 +981,6 @@ void CmndPoPChallenge(void) {
else{
Response_P( "{ \"%s\": \"%s\" }", D_CMND_POPCHALLENGE, "Please define a challenge" );
}

MqttPublishPrefixTopicRulesProcess_P(STAT, D_CMND_POPCHALLENGERESULT, Settings->flag5.mqtt_status_retain);
ResponseClear();
}
Expand Down Expand Up @@ -1170,6 +1171,13 @@ void CmndCIDsToBeQueried(void) {
ResponseClear();
}

void CmndVersion(void) {
Response_P( "{ \"%s\": \"%s\" }", D_CMND_VERSION, RDDL_VERSION);

CmndStatusResponse(41);
ResponseClear();
}

void CmndStatus(void)
{
int32_t payload = XdrvMailbox.payload;
Expand Down
10 changes: 9 additions & 1 deletion tasmota/tasmota_xdrv_driver/xdrv_129_rddl_network.ino
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ void SetExecutePoP(){
executePoP = true;
}


void releaseNotarizationMutex()
{
g_mutex_running_notarization = false;
Expand Down Expand Up @@ -226,7 +227,14 @@ void InitializePoPWorkflow(){
AddLog(2, "PoP: initialize PoP challenge");

// select CID
uint32_t cidsToBeQueried = (uint32_t)atoi(sdkGetSetting( SET_CIDS_TO_BE_QUERIED));
uint32_t cidsToBeQueried = 1;
char* cids2Bqueried = sdkGetSetting(SET_CIDS_TO_BE_QUERIED);
if( cids2Bqueried == NULL or strcmp( (const char*) cids2Bqueried, "") == 0 )
cidsToBeQueried = 2;
uint32_t tmpCids2Bqueried = (uint32_t)atoi(cids2Bqueried);
if( tmpCids2Bqueried > 0 ){
cidsToBeQueried = tmpCids2Bqueried;
}
char* cid = getCIDofChallengee( cidsToBeQueried );
if( cid == NULL ){
AddLog(2, "{ \"PoP\": no cid retrieved }");
Expand Down
3 changes: 1 addition & 2 deletions tasmota/user_config_override_sample.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@ Examples :
// !!! Remember that your changes GOES AT THE BOTTOM OF THIS FILE right before the last #endif !!!
*/



#define RDDL_VERSION "rddl-v0.0.0"


#endif // _USER_CONFIG_OVERRIDE_H_