mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-12-06 04:44:22 +00:00
Added raw ASCII char field in keyboard view
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
*/
|
||||
|
||||
// Bitmaps generated with:
|
||||
// Gimp :( > indexed colors, then "xxd -i *.bmp"
|
||||
// Gimp image > indexed colors (16), then "xxd -i *.bmp"
|
||||
|
||||
//BUG: No audio in about when shown second time
|
||||
//BUG: Description doesn't show up first time going to system>module info (UI drawn on top)
|
||||
|
||||
@@ -1,3 +1,25 @@
|
||||
/*
|
||||
* Copyright (C) 2014 Jared Boone, ShareBrained Technology, Inc.
|
||||
* Copyright (C) 2016 Furrtek
|
||||
*
|
||||
* This file is part of PortaPack.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 51 Franklin Street,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
const unsigned char splash_bmp[] = {
|
||||
0x42, 0x4d, 0x28, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x00,
|
||||
0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0xb9, 0x00, 0x00, 0x00, 0x1b, 0x01,
|
||||
|
||||
@@ -106,12 +106,12 @@ AlphanumView::AlphanumView(
|
||||
}
|
||||
};
|
||||
|
||||
/*add_child(&raw_char);
|
||||
add_child(&raw_char);
|
||||
raw_char.set_value(0x30);
|
||||
raw_char.on_select = [this, &nav, txt, max_len](Button&) {
|
||||
raw_char.on_select = [this, &nav, txt, max_len](NumberField&) {
|
||||
char_add(raw_char.value());
|
||||
update_text();
|
||||
};*/
|
||||
};
|
||||
|
||||
add_child(&button_done);
|
||||
button_done.on_select = [this, &nav, txt, max_len](Button&) {
|
||||
|
||||
@@ -73,13 +73,13 @@ private:
|
||||
"UC"
|
||||
};
|
||||
|
||||
/*NumberField raw_char {
|
||||
{ 16, 270, 16, 16 },
|
||||
NumberField raw_char {
|
||||
{ 16, 270 },
|
||||
3,
|
||||
{ 1, 255 },
|
||||
1,
|
||||
'0'
|
||||
};*/
|
||||
};
|
||||
|
||||
Button button_done {
|
||||
{ 88, 270, 64, 24 },
|
||||
|
||||
@@ -123,7 +123,11 @@ void LCRView::generate_message() {
|
||||
// Alt format
|
||||
for (dp = 0; dp < strlen(lcr_message); dp++) {
|
||||
pp = pm;
|
||||
cur_byte = alt_lookup[(uint8_t)lcr_message[dp] & 0x7F];
|
||||
// Do not apply LUT on checksum (last byte) ?
|
||||
if (dp != strlen(lcr_message) - 1)
|
||||
cur_byte = alt_lookup[(uint8_t)lcr_message[dp] & 0x7F];
|
||||
else
|
||||
cur_byte = lcr_message[dp];
|
||||
for (cp = 0; cp < 8; cp++) {
|
||||
if ((cur_byte >> cp) & 1) pp++;
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ private:
|
||||
// 9: 85 ?
|
||||
|
||||
const char alt_lookup[128] = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x0F, // 0
|
||||
0, 0, 0, 0x5F, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x0F, // 0
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 10
|
||||
0xF8, 0, 0x99, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 20 !"#$%&'()*+,-./
|
||||
0xF5, 0, 0x94, 0x55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1C, 0, 0, // 30 0123456789:;<=>?
|
||||
|
||||
Reference in New Issue
Block a user