Subject:
|
Re: what is a "single byte difference" error from makelx?
|
Newsgroups:
|
lugnet.robotics.rcx.legos
|
Date:
|
Tue, 26 Dec 2000 03:44:24 GMT
|
Viewed:
|
1628 times
|
| |
| |
In lugnet.robotics.rcx.legos, Ben Jackson writes:
> While posting this I finally figured it out. Someone added my battery code
> to the kernel with the same function name, so that error must mean "your
> code has a symbol which duplicates a kernel symbol".
Speaking of your battery code, I think we should add a demo program that
utilizes your function.
Rossz
P.S. Merry Christmas
// Displays the battery voltage level, e.g. "8.7v". Ok, so the "v"
// looks more like a "u". It's a limitation of the display.
#include <conio.h>
#include <unistd.h>
#include <sys/battery.h>
int main(int argc, char **argv) {
int b = get_battery_mv() / 100;
cls();
cputc_0(32);
cputc_hex_3(b / 10);
cputc_hex_2(b % 10);
dlcd_show(LCD_3_DOT);
cputc_1('v');
sleep(2);
dlcd_hide(LCD_3_DOT);
cls();
return 0;
}
|
|
Message is in Reply To:
2 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|