Skip to content

Commit 5968796

Browse files
committed
Fix config.gain
1 parent 6d787a0 commit 5968796

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/SparkFun_ADS1219.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ bool SfeADS1219Driver::getConfigurationRegister(sfe_ads1219_reg_cfg_t &config)
187187
/// @return True if successful, false otherwise.
188188
bool SfeADS1219Driver::setConfigurationRegister(sfe_ads1219_reg_cfg_t config)
189189
{
190-
_adcGain = config.gain; // Update the local copy of the gain for voltage conversion
190+
_adcGain = (ads1219_gain_config_t)config.gain; // Update the local copy of the gain for voltage conversion
191191
return (_theBus->writeRegisterByte(kSfeADS1219RegConfigWrite, config.byte) == kSTkErrOk); // Write the config register
192192
}
193193

0 commit comments

Comments
 (0)