The field version of the solarnano grid on the ionQubes
Fork of SolarNanoGridv3 by
Diff: Battery/Battery.cpp
- Revision:
- 36:a5620262f296
- Parent:
- 35:ede6d8bad011
diff -r ede6d8bad011 -r a5620262f296 Battery/Battery.cpp --- a/Battery/Battery.cpp Wed Aug 03 12:51:48 2016 +0000 +++ b/Battery/Battery.cpp Tue Sep 06 06:08:56 2016 +0000 @@ -271,16 +271,18 @@ case ('M'): { - - sscanf (&dataRx[2],"%f",&maxChargeRate ); - if(maxChargeRate>2.0f) { - maxChargeRate=2.0f; - } - if (maxChargeRate<0.0f) { - maxChargeRate=0.0f; - } - DBG ("Max charge %f",maxChargeRate); - + #ifdef USEHUBCHARGERATE + sscanf (&dataRx[2],"%f",&maxChargeRate ); + if(maxChargeRate>2.0f) { + maxChargeRate=2.0f; + } + if (maxChargeRate<0.0f) { + maxChargeRate=0.0f; + } + DBG ("Max charge %f",maxChargeRate); + #else + DBG("Max charge rate being ignored..."); + #endif break; } }