Subversion Repositories Projects

Rev

Rev 431 | Rev 514 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 431 Rev 489
Line 145... Line 145...
145
}
145
}
Line 146... Line 146...
146
 
146
 
147
/**
147
/**
148
 *  write an ascii <string> from progmen at <x>/<y> to MAX7456 display memory
148
 *  write an ascii <string> from progmen at <x>/<y> to MAX7456 display memory
149
 */
149
 */
150
void write_ascii_string_pgm(uint8_t x, uint8_t y, char *string) {
150
void write_ascii_string_pgm(uint8_t x, uint8_t y, const char *string) {
151
        while (pgm_read_byte(string) != 0x00)
151
        while (pgm_read_byte(string) != 0x00)
152
                write_ascii_char(((x++)+(y * 30)), pgm_read_byte(string++));
152
                write_ascii_char(((x++)+(y * 30)), pgm_read_byte(string++));
Line 153... Line 153...
153
}
153
}
154
 
154
 
155
/**
155
/**
156
 *  write an <string> from progmen at <x>/<y> downwards to MAX7456 display memory
156
 *  write an <string> from progmen at <x>/<y> downwards to MAX7456 display memory
157
 */
157
 */
158
void write_string_pgm_down(uint8_t x, uint8_t y, char *string, uint8_t length) {
158
void write_string_pgm_down(uint8_t x, uint8_t y, const char *string, uint8_t length) {
159
        while (length--)
159
        while (length--)
Line 160... Line 160...
160
                write_char((x+(y++ * 30)), pgm_read_byte(string++));
160
                write_char((x+(y++ * 30)), pgm_read_byte(string++));
Line 358... Line 358...
358
 
358
 
359
/**
359
/**
360
 * wirte a <position> at <x>/<y> assuming it is a gps position for long-/latitude
360
 * wirte a <position> at <x>/<y> assuming it is a gps position for long-/latitude
361
 */
361
 */
362
void write_gps_pos(uint8_t x, uint8_t y, int32_t position) {
362
void write_gps_pos(uint8_t x, uint8_t y, int32_t position) {
363
        if (position < 0) {
363
        if (position < 0) {
364
                position ^= ~0;
364
                position ^= ~0;
365
                position++;
365
                position++;
366
                write_char_xy(x++, y, 0x49); // minus
366
                write_char_xy(x++, y, 0x49); // minus
367
        } else {
367
        } else {
368
                write_char_xy(x++, y, 0); // clear ('+' would be nice, maybe later)
368
                write_char_xy(x++, y, 0); // clear ('+' would be nice, maybe later)