Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
FredM67 committed Oct 4, 2023
1 parent e0cefcd commit cfb0204
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Mk2_3phase_RFdatalog_temp/processing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,16 @@ constexpr OutputModes outputMode{ OutputModes::NORMAL }; /**< Output mode to be
constexpr auto initThreshold(const bool lower)
{
return lower
? f_capacityOfEnergyBucket_main * (0.5F - ((OutputModes::ANTI_FLICKER == outputMode) ? f_offsetOfEnergyThresholdsInAFmode : 0))
: f_capacityOfEnergyBucket_main * (0.5F + ((OutputModes::ANTI_FLICKER == outputMode) ? f_offsetOfEnergyThresholdsInAFmode : 0));
? f_capacityOfEnergyBucket_main * (0.5F - ((OutputModes::ANTI_FLICKER == outputMode) ? f_offsetOfEnergyThresholdsInAFmode : 0.0F))
: f_capacityOfEnergyBucket_main * (0.5F + ((OutputModes::ANTI_FLICKER == outputMode) ? f_offsetOfEnergyThresholdsInAFmode : 0.0F));
}

constexpr float f_lowerThreshold_default{ initThreshold(true) }; /**< lower default threshold set accordingly to the output mode */
constexpr float f_upperThreshold_default{ initThreshold(false) }; /**< upper default threshold set accordingly to the output mode */

float f_energyInBucket_main{ 0 }; /**< main energy bucket (over all phases) */
float f_lowerEnergyThreshold; /**< dynamic lower threshold */
float f_upperEnergyThreshold; /**< dynamic upper threshold */
float f_energyInBucket_main{ 0.0F }; /**< main energy bucket (over all phases) */
float f_lowerEnergyThreshold; /**< dynamic lower threshold */
float f_upperEnergyThreshold; /**< dynamic upper threshold */

// for improved control of multiple loads
bool b_recentTransition{ false }; /**< a load state has been recently toggled */
Expand Down

0 comments on commit cfb0204

Please sign in to comment.