Commit 2a795722 authored by Martin Vítek's avatar Martin Vítek
Browse files

Add find_character()

parent 61268348
......@@ -7,6 +7,8 @@
#include "Render.h"
void find_character(uint8_t character);
int main()
{
sss.init();
......@@ -20,6 +22,23 @@ int main()
sss.lcd.write_text("24V: V");
*/
/*
for (uint8_t i = 255; i > 0; i--)
{
sss.lcd.gotoxy_new(0,0);
sss.lcd.write_num(i);
sss.lcd.gotoxy_new(1,0);
sss.lcd.write_char(i);
_delay_ms(700);
}
*/
uint8_t character = 255;
//find_character(character);
status_screen status;
sss.lcd.gotoxy_new(0,0);
......@@ -39,3 +58,34 @@ int main()
_delay_ms(100);
}
}
void find_character(uint8_t character)
{
for(;;)
{
if (sss.enc.event)
{
if (sss.enc.count >= 3)
{
character++;
sss.enc.count = 0;
}
if (sss.enc.count<=-1)
{
character--;
sss.enc.count = 0;
}
sss.lcd.gotoxy_new(0,0);
sss.lcd.write_num(character);
sss.lcd.gotoxy_new(1,0);
sss.lcd.write_char(character);
sss.enc.event = false;
}
_delay_ms(50);
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment