mirror of
https://github.com/travisgoodspeed/goodwatch
synced 2024-11-22 08:09:13 +00:00
Cleanup.
This commit is contained in:
parent
6bc72454d4
commit
560e48266e
@ -41,7 +41,7 @@ static unsigned int adc12_getvcc(){
|
|||||||
VCC.
|
VCC.
|
||||||
|
|
||||||
So 0xb2a*2.0 / 4095 * 2.5 == 3.49, our battery voltage.
|
So 0xb2a*2.0 / 4095 * 2.5 == 3.49, our battery voltage.
|
||||||
Simplified, we can get hundreds of a volt by mulitplying
|
Simplified, we can get hundreds of a volt by multiplying
|
||||||
ADC12MEM0 with 0.1221.
|
ADC12MEM0 with 0.1221.
|
||||||
*/
|
*/
|
||||||
vcc= (int) ADC12MEM0*0.1221001221001221;
|
vcc= (int) ADC12MEM0*0.1221001221001221;
|
||||||
@ -112,8 +112,6 @@ static unsigned int adc10_getvcc(){
|
|||||||
ADC10CTL1=0;
|
ADC10CTL1=0;
|
||||||
ADC10MCTL0=0;
|
ADC10MCTL0=0;
|
||||||
|
|
||||||
//printf("VCC sampled as %d\n", vcc);
|
|
||||||
|
|
||||||
return vcc;
|
return vcc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user