Ziggy2013 / minimosd-extra

Automatically exported from code.google.com/p/minimosd-extra
0 stars 0 forks source link

RSSI showing duplicated % when gets one less digit #67

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Reported by Steven G. Thanks Steven! :)
(http://diydrones.com/xn/detail/705844:Comment:1624079)

What steps will reproduce the problem?
1.Get a RSSI % of say 3 digits (100%)
2.Get a RSSI % of say 2 digits (98%)

What is the expected output? What do you see instead?
Should output 98% or <blank space>98% or 098%
It's outpinting 98%% (two percentage symbols)

It's using,
static int16_t rssi = -99;
osd.printf("%c%3i%c", 0x09, rssi, 0x25); //Should print 1 leading space

Possible fixes:
1. static int rssi = -99;
2. osd.printf("%c%3.3i%c", 0x09, rssi, 0x25); //Should print 1 leading zero

Original issue reported on code.google.com by vitor.ro...@gmail.com on 15 Apr 2014 at 10:20

GoogleCodeExporter commented 9 years ago
One fix (hack) I use for this problem is to write an extra blank space after 
the % sign. Works fine as long as you have an extra space without a panel in it 
to the right of the RSSI panel.

Another work around would be to limit the rssi to 99% instead of 100.

Original comment by efu...@gmail.com on 30 Aug 2014 at 4:28

GoogleCodeExporter commented 9 years ago
Closed as we have a new version.

Ifthe problem is still present please reopen it.

Original comment by gabek...@gmail.com on 28 Nov 2014 at 11:44