File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -488,22 +488,22 @@ void upsdrv_updateinfo(void)
488488 optifill ( _pollv_ps , sizeof (_pollv_ps )/sizeof (_pollv_ps [0 ]) );
489489
490490 r = optiquery ( "NV" );
491- float inV = strtol ( _buf , NULL , 10 );
491+ short inV = atoi ( _buf );
492492 r = optiquery ( "OV" );
493- float outV = strtol ( _buf , NULL , 10 );
493+ short outV = atoi ( _buf );
494494
495495 r = optiquery ( "FV" );
496496 if ( r >= 1 )
497497 {
498- float f = strtol ( _buf , NULL , 10 );
498+ short f = atoi ( _buf );
499499 if ( f > 180 )
500500 {
501501 inV = inV * 2 ;
502502 outV = outV * 2 ;
503503 }
504504 }
505- dstate_setinfo ( "input.voltage" , "%.1f " , inV );
506- dstate_setinfo ( "output.voltage" , "%.1f " , outV );
505+ dstate_setinfo ( "input.voltage" , "%d " , inV );
506+ dstate_setinfo ( "output.voltage" , "%d " , outV );
507507 }
508508 else
509509 optifill ( _pollv , sizeof (_pollv )/sizeof (_pollv [0 ]) );
You can’t perform that action at this time.
0 commit comments