@@ -44,7 +44,7 @@ void HX711_ADC::begin(uint8_t gain)
4444/* start(t):
4545* will do conversions continuously for 't' +400 milliseconds (400ms is min. settling time at 10SPS).
4646* Running this for 1-5s in setup() - before tare() seems to improve the tare accuracy */
47- void HX711_ADC::start (unsigned int t)
47+ void HX711_ADC::start (unsigned long t)
4848{
4949 t += 400 ;
5050 lastDoutLowTime = millis ();
@@ -60,7 +60,7 @@ void HX711_ADC::start(unsigned int t)
6060/* start(t, dotare) with selectable tare:
6161* will do conversions continuously for 't' +400 milliseconds (400ms is min. settling time at 10SPS).
6262* Running this for 1-5s in setup() - before tare() seems to improve the tare accuracy. */
63- void HX711_ADC::start (unsigned int t, bool dotare)
63+ void HX711_ADC::start (unsigned long t, bool dotare)
6464{
6565 t += 400 ;
6666 lastDoutLowTime = millis ();
@@ -79,7 +79,7 @@ void HX711_ADC::start(unsigned int t, bool dotare)
7979/* startMultiple(t): use this if you have more than one load cell and you want to do tare and stabilization simultaneously.
8080* Will do conversions continuously for 't' +400 milliseconds (400ms is min. settling time at 10SPS).
8181* Running this for 1-5s in setup() - before tare() seems to improve the tare accuracy */
82- int HX711_ADC::startMultiple (unsigned int t)
82+ int HX711_ADC::startMultiple (unsigned long t)
8383{
8484 tareTimeoutFlag = 0 ;
8585 lastDoutLowTime = millis ();
@@ -128,7 +128,7 @@ int HX711_ADC::startMultiple(unsigned int t)
128128* use this if you have more than one load cell and you want to (do tare and) stabilization simultaneously.
129129* Will do conversions continuously for 't' +400 milliseconds (400ms is min. settling time at 10SPS).
130130* Running this for 1-5s in setup() - before tare() seems to improve the tare accuracy */
131- int HX711_ADC::startMultiple (unsigned int t, bool dotare)
131+ int HX711_ADC::startMultiple (unsigned long t, bool dotare)
132132{
133133 tareTimeoutFlag = 0 ;
134134 lastDoutLowTime = millis ();
@@ -171,6 +171,7 @@ int HX711_ADC::startMultiple(unsigned int t, bool dotare)
171171 }
172172 }
173173 }
174+ else return 1 ;
174175 }
175176 }
176177 return startStatus;
@@ -422,7 +423,6 @@ long HX711_ADC::getSettlingTime()
422423void HX711_ADC::setSamplesInUse (int samples)
423424{
424425 int old_value = samplesInUse;
425- int old_divbit = divBit;
426426
427427 if (samples <= SAMPLES)
428428 {
0 commit comments