Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederic Metrich committed Jun 18, 2023
1 parent da0b31b commit 1dab9b5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Mk2_3phase_RFdatalog_temp/utils_relay.h
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,8 @@ template< uint8_t T = 1 > class relayOutput
const uint16_t minON{ 5 * 60 }; /**< Minimum duration in seconds the relay is turned ON */
const uint16_t minOFF{ 5 * 60 }; /**< Minimum duration in seconds the relay is turned OFF */

uint16_t duration{ 0 }; /**< Duration of the current state */
bool relayState{ false }; /**< State of the relay */
uint16_t duration{ 0 }; /**< Duration of the current state */
bool relayState{ false }; /**< State of the relay */

static inline movingAvg< int16_t, T * 60 / DATALOG_PERIOD_IN_SECONDS > sliding_Average;
};
Expand Down
8 changes: 4 additions & 4 deletions RST_375us_dev/RST_375us_dev.ino
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ void timerIsr(void)
switch (sample_index)
{
case 0:
sample_V1 = ADC; // store the ADC value (this one is for Voltage)
sample_V1 = ADC; // store the ADC value (this one is for Voltage)
ADMUX = 0x40 + sensor_I1; // set up the next conversion, which is for current at CT1
ADCSRA |= (1 << ADSC); // start the ADC
++sample_index; // increment the control flag
Expand All @@ -173,10 +173,10 @@ void timerIsr(void)
++sample_index; // increment the control flag
break;
case 2:
sample_I2_raw = ADC; // store the ADC value (this one is for current at CT2)
sample_I2_raw = ADC; // store the ADC value (this one is for current at CT2)
ADMUX = 0x40 + sensor_V1; // set up the next conversion, which is for Voltage
ADCSRA |= (1 << ADSC); // start the ADC
sample_index = 0; // reset the control flag
ADCSRA |= (1 << ADSC); // start the ADC
sample_index = 0; // reset the control flag
break;
default:
sample_index = 0; // to prevent lockup (should never get here)
Expand Down

0 comments on commit 1dab9b5

Please sign in to comment.