aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmain.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/main.c b/main.c
index 72f3761..b7b2a48 100755
--- a/main.c
+++ b/main.c
@@ -131,7 +131,7 @@ int main() {
ldr = Adc_Read(0);
if (ldr_chg != ldr) {
- Vfd_Set_Brightness(1024 / ldr);
+ Vfd_Set_Brightness(3 - ((1024 / ldr) - 1));
ldr_chg = ldr;
}
@@ -151,9 +151,9 @@ int main() {
sprintf(buf, "%sWKDAY:%s\t%d\t\t%sDAY:%s\t%s\r\n", YELLOW, CLRATTR,
dayOfWeek, YELLOW, CLRATTR, weekday);
UART_send_string(buf);
- sprintf(buf, "%sTEMP:\t%s%c%c%c.%c%cC%s\t\t%sLDR:%s\t\%d\r\n",
+ sprintf(buf, "%sTEMP:\t%s%c%c%c.%c%cC%s\t\t%sLDR:%s\t\%04d %d\r\n",
YELLOW, CLRATTR, temp_sign, temp_2, temp_1, temp_0, 0xB0,
- CLRATTR, YELLOW, CLRATTR, ldr);
+ CLRATTR, YELLOW, CLRATTR, ldr, ((3 - (1024 / ldr))) - 1);
UART_send_string(buf);
#endif
}