Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: C12832 FXOS8700CQ LM75B mbed
Diff: main.cpp
- Revision:
- 3:a4dac093a968
- Parent:
- 2:5d0c209e5c61
- Child:
- 4:5bf99eb2d740
diff -r 5d0c209e5c61 -r a4dac093a968 main.cpp
--- a/main.cpp Wed Feb 10 01:01:54 2016 +0000
+++ b/main.cpp Wed Feb 10 01:41:39 2016 +0000
@@ -37,7 +37,7 @@
int main(void)
{
host.baud(38400);
- host.printf("Hello gtvl2, from FRDM-K64F!\r\nUse POT1 to change the refresh rate, POT2 to change the scale of the graphic and SW2 to change the unit\r\n");
+ host.printf("Hello gtvl2, from FRDM-K64F!\r\nUse POT1 to change the refresh rate, POT2 to change the scale of the graphic and SW2 to change the unit.\r\n");
r_led = 0.0;
g_led = 0.0;
@@ -77,7 +77,7 @@
/*
* Change refresh_time according to POT1's value
*/
- refresh_time = (int) (MIN_REFRESH_TIME + (pot * (MAX_REFRESH_TIME - MIN_REFRESH_TIME)));
+ refresh_time = (int) (MIN_REFRESH_TIME + ((1.0f - pot) * (MAX_REFRESH_TIME - MIN_REFRESH_TIME)));
wait_ms(refresh_time);
}
}
\ No newline at end of file