File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ bool MCP9600::setThermocoupleResolution(Thermocouple_Resolution res)
190190Thermocouple_Resolution MCP9600::getThermocoupleResolution ()
191191{
192192 uint8_t config = readSingleRegister (DEVICE_CONFIG); // grab current device configuration
193- uint8_t res; // define new thermocoupleResolution enum to return
193+ uint8_t res = 0 ; // define new thermocoupleResolution enum to return
194194 bool highResolutionBit = bitRead (config, 6 );
195195 bool lowResolutionBit = bitRead (config, 5 );
196196 bitWrite (res, 1 , highResolutionBit); // set 1st bit of the enum to the 6th bit of the config register
@@ -270,7 +270,7 @@ Burst_Sample MCP9600::getBurstSamples()
270270 bool highResolutionBit = bitRead (config, 4 );
271271 bool midResolutionBit = bitRead (config, 3 );
272272 bool lowResolutionBit = bitRead (config, 2 );
273- uint8_t samples;
273+ uint8_t samples = 0 ;
274274 bitWrite (samples, 2 , highResolutionBit); // write 4th bit of config to 2nd bit of samples
275275 bitWrite (samples, 1 , midResolutionBit); // write 3rd bit of config to 1st bit of samples
276276 bitWrite (samples, 0 , lowResolutionBit); // write 2nd bit of config to 0th bit of samples
You can’t perform that action at this time.
0 commit comments