Skip to content
Snippets Groups Projects
Commit 44a7b807 authored by Mark Tearle's avatar Mark Tearle
Browse files

Fix bug in ROM vis display of periods on the display

parent 36422914
Branches
Tags
No related merge requests found
......@@ -15,6 +15,8 @@ void display_reset();
void set_msg(char newmsg[11]) {
int i;
int prevchar = 0;
//display_reset();
spi_enable();
for (i=0; i < 10; i++) {
......@@ -22,8 +24,32 @@ void set_msg(char newmsg[11]) {
}
display_send_byte(0xaf); // reset ptr to start
for (i--; i >= 0; i--) {
if (prevchar && newmsg[i] == 0x2E) {
display_send_byte(newmsg[i]&0x7f);
continue;
}
// check if next character is a period
if (newmsg[i] == 0x2E) {
prevchar = newmsg[i];
continue;
}
if (prevchar) {
display_send_byte(newmsg[i]&0x7f);
display_send_byte(prevchar&0x7f);
prevchar = 0;
continue;
}
if (newmsg[i] == 0) break;
display_send_byte(newmsg[i]&0x7f);
}
if (prevchar) {
display_send_byte(prevchar&0x7f);
}
spi_disable();
}
......
#!/usr/bin/perl -w
# keep the format of this next line the same to match regex in check-romsrc.pl
$origin = 0x9c80;
$origin = 0x9d00;
$hole_start = 0xb600;
$hole_size = 0x0200;
......
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