mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-06-28 08:37:31 -04:00
Added basic APRS transmit
Added goertzel algo Updated binary
This commit is contained in:
parent
7fd987a2b4
commit
8573f760be
17 changed files with 376 additions and 76 deletions
|
@ -1309,17 +1309,19 @@ SymField::SymField(
|
|||
} else if (type == SYMFIELD_HEX) {
|
||||
for (c = 0; c < length; c++)
|
||||
set_symbol_list(c, "0123456789ABCDEF");
|
||||
} else if (type == SYMFIELD_ALPHANUM) {
|
||||
for (c = 0; c < length; c++)
|
||||
set_symbol_list(c, " 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ");
|
||||
}
|
||||
|
||||
set_focusable(true);
|
||||
}
|
||||
|
||||
uint32_t SymField::value_dec_u32() {
|
||||
uint32_t c, mul = 1;
|
||||
uint32_t v = 0;
|
||||
uint32_t mul = 1, v = 0;
|
||||
|
||||
if (type_ == SYMFIELD_DEC) {
|
||||
for (c = 0; c < length_; c++) {
|
||||
for (uint32_t c = 0; c < length_; c++) {
|
||||
v += values_[(length_ - 1 - c)] * mul;
|
||||
mul *= 10;
|
||||
}
|
||||
|
@ -1329,16 +1331,27 @@ uint32_t SymField::value_dec_u32() {
|
|||
}
|
||||
|
||||
uint64_t SymField::value_hex_u64() {
|
||||
uint32_t c;
|
||||
uint64_t v = 0;
|
||||
|
||||
if (type_ != SYMFIELD_DEF) {
|
||||
for (c = 0; c < length_; c++)
|
||||
for (uint32_t c = 0; c < length_; c++)
|
||||
v += (uint64_t)(values_[c]) << (4 * (length_ - 1 - c));
|
||||
return v;
|
||||
} else
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::string SymField::value_string() {
|
||||
std::string return_string { "" };
|
||||
|
||||
if (type_ == SYMFIELD_ALPHANUM) {
|
||||
for (uint32_t c = 0; c < length_; c++) {
|
||||
return_string += symbol_list_[0][values_[c]];
|
||||
}
|
||||
}
|
||||
|
||||
return return_string;
|
||||
}
|
||||
|
||||
uint32_t SymField::get_sym(const uint32_t index) {
|
||||
if (index >= length_) return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue