forked from len0rd/rockbox
Resistor calculator: make brace-style consistent
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28282 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
6ebec89ac6
commit
0d91797d96
1 changed files with 27 additions and 32 deletions
|
@ -721,8 +721,7 @@ static void led_resistance_calc(void)
|
||||||
|
|
||||||
power_ten=0;
|
power_ten=0;
|
||||||
temp=rounded_resistance;
|
temp=rounded_resistance;
|
||||||
while(temp>=100)
|
while(temp>=100) {
|
||||||
{
|
|
||||||
temp/=10;
|
temp/=10;
|
||||||
power_ten++;
|
power_ten++;
|
||||||
}
|
}
|
||||||
|
@ -867,8 +866,7 @@ static void resistance_to_color(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
temp=kbd_input_int;
|
temp=kbd_input_int;
|
||||||
while(temp>=100)
|
while(temp>=100) {
|
||||||
{
|
|
||||||
temp/=10;
|
temp/=10;
|
||||||
power_ten++;
|
power_ten++;
|
||||||
}
|
}
|
||||||
|
@ -881,8 +879,7 @@ static void resistance_to_color(void)
|
||||||
|
|
||||||
if( first_band == RES_INVALID
|
if( first_band == RES_INVALID
|
||||||
|| second_band == RES_INVALID
|
|| second_band == RES_INVALID
|
||||||
|| multiplier == RES_INVALID)
|
|| multiplier == RES_INVALID) {
|
||||||
{
|
|
||||||
rb->splashf(HZ, "%d %s can not be represented",
|
rb->splashf(HZ, "%d %s can not be represented",
|
||||||
in_resistance_int,band_data[units_used].unit);
|
in_resistance_int,band_data[units_used].unit);
|
||||||
return;
|
return;
|
||||||
|
@ -959,16 +956,14 @@ static void color_to_resistance(void)
|
||||||
#endif
|
#endif
|
||||||
draw_resistor_text(first_band, second_band, third_band, fourth_band);
|
draw_resistor_text(first_band, second_band, third_band, fourth_band);
|
||||||
|
|
||||||
if(total_resistance_centiunits % 100 == 0)
|
if(total_resistance_centiunits % 100 == 0) {
|
||||||
{
|
|
||||||
/* No decimals */
|
/* No decimals */
|
||||||
rb->snprintf(total_resistance_str, sizeof(total_resistance_str),
|
rb->snprintf(total_resistance_str, sizeof(total_resistance_str),
|
||||||
"Resistance: %d %s",
|
"Resistance: %d %s",
|
||||||
total_resistance_centiunits/100,
|
total_resistance_centiunits/100,
|
||||||
unit_abbrev);
|
unit_abbrev);
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
rb->snprintf(total_resistance_str, sizeof(total_resistance_str),
|
rb->snprintf(total_resistance_str, sizeof(total_resistance_str),
|
||||||
"Resistance: %d.%2.2d %s",
|
"Resistance: %d.%2.2d %s",
|
||||||
total_resistance_centiunits/100,
|
total_resistance_centiunits/100,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue