Blame |
Last modification |
View Log
| RSS feed
#include <avr/io.h>
#include <inttypes.h>
#include <stdlib.h>
#include <avr/pgmspace.h>
#include "main.h"
#include "lcd.h"
#include "usart.h"
// Insgesamt 32 Werte können angezeigt werden
// jeweils 8 Stück werden gleichzeitg angezeigt
// Auswahl über Tasten
uint8_t displ_page
;
void displ_get_text
(uint8_t number
)
{
#if 0
uint8_t text
[17];
uint8_t i
;
buffer
[0] = '#';
buffer
[1] = 'a';
buffer
[2] = 'a';
buffer
[3] = number
;
buffer
[4] = 0;
buffer
[5] = 0;
// base64_send(6);
do
{
// get_message ();
}
while (buffer
[1] != 'A');
for (i
= 0; i
< 16; i
++)
text
[i
] = buffer
[i
];
text
[16] = 0x00;
lcd_print_at
(0, (number
& 0x07), text
, 0);
#endif
}
void displ_values
(void)
{
#if 0
uint8_t displ_page
, i
;
int16_t value
;
uint8_t text
[17];
displ_page
= 0; // Page 0..3 (4 Pages zu je 8 Werte)
lcd_cls
(); // LCD löschen
do
{
for (i
= 0; i
< 8; i
++) // Texte lesen und anzeigen
displ_get_text
(i
+ displ_page
* 8);
do
{
// get_message ();
if (buffer
[1] == 'D')
{
for (i
= 0; i
< 8; i
++)
{
value
= buffer
[i
* 2 + displ_page
* 16 + 2] + 256 * buffer
[i
* 2 + displ_page
* 16 + 3];
itoa (value
, text
, 10);
lcd_printp_at
(14, i
, PSTR
(" "), 0);
lcd_print_at
(14, i
, text
, 0);
}
}
}
while (key
== key_nokey
);
if (key
== key_minus
)
displ_page
++;
if (key
== key_plus
)
displ_page
--;
displ_page
&= 0x03;
}
while (key
!= key_enter
);
#endif
}