Compare commits
4 Commits
e431ec0866
...
cb7b56c83a
Author | SHA1 | Date |
---|---|---|
Sebastian Denz | cb7b56c83a | 4 years ago |
Sebastian Denz | 9b7ffd4d3d | 4 years ago |
Sebastian Denz | 0699954311 | 4 years ago |
Sebastian Denz | 66c6a10ab6 | 4 years ago |
24 changed files with 7209 additions and 2921 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
@ -0,0 +1,138 @@ |
|||
const uint8_t DejaVuSansMono5pt7bBitmaps[] PROGMEM = { |
|||
0x00, 0xFA, 0xB6, 0x80, 0x28, 0xA7, 0xD4, 0xF9, 0x45, 0x00, 0x23, 0xE9, |
|||
0xC3, 0x97, 0xC4, 0xE2, 0x8E, 0x8C, 0x5C, 0x51, 0xC0, 0x72, 0x19, 0x59, |
|||
0xC9, 0xA0, 0xE0, 0x6A, 0xAA, 0x40, 0xA5, 0x56, 0x80, 0xAB, 0x9D, 0x50, |
|||
0x21, 0x3E, 0x42, 0x00, 0xE0, 0xE0, 0x80, 0x08, 0x84, 0x42, 0x21, 0x10, |
|||
0x74, 0x63, 0x58, 0xC5, 0xC0, 0xE1, 0x08, 0x42, 0x13, 0xE0, 0x74, 0x42, |
|||
0x33, 0x23, 0xE0, 0x74, 0x42, 0xE0, 0xC5, 0xC0, 0x11, 0x95, 0xAF, 0x88, |
|||
0x40, 0xF4, 0x3C, 0x10, 0x87, 0xC0, 0x7E, 0x21, 0xE8, 0xC5, 0xC0, 0xF8, |
|||
0xC4, 0x22, 0x11, 0x00, 0x74, 0x62, 0xE8, 0xC5, 0xC0, 0x74, 0x62, 0xF0, |
|||
0x8F, 0xC0, 0x88, 0x8E, 0x0B, 0xA0, 0xE0, 0x80, 0xF8, 0x3E, 0x83, 0x82, |
|||
0xE8, 0x00, 0xF1, 0x24, 0x40, 0x40, 0x72, 0x6F, 0x5A, 0xD6, 0xE8, 0x30, |
|||
0x21, 0x14, 0xA7, 0x46, 0x20, 0xF4, 0x63, 0xE8, 0xC7, 0xC0, 0x7E, 0x61, |
|||
0x08, 0x65, 0xE0, 0xF4, 0xE3, 0x18, 0xCF, 0xC0, 0xFC, 0x21, 0xF8, 0x43, |
|||
0xE0, 0xFC, 0x21, 0xF8, 0x42, 0x00, 0x76, 0x61, 0x38, 0xE5, 0xE0, 0x8C, |
|||
0x63, 0xF8, 0xC6, 0x20, 0xF9, 0x08, 0x42, 0x13, 0xE0, 0x71, 0x11, 0x19, |
|||
0x60, 0x8C, 0xA9, 0x8A, 0x4A, 0x20, 0x84, 0x21, 0x08, 0x43, 0xE0, 0x8E, |
|||
0xF7, 0x58, 0xC6, 0x20, 0x8E, 0x73, 0x59, 0xCE, 0x20, 0x74, 0x63, 0x18, |
|||
0xC5, 0xC0, 0xF4, 0x63, 0xE8, 0x42, 0x00, 0x74, 0x63, 0x18, 0xC5, 0xC3, |
|||
0xF2, 0x28, 0xBC, 0x9A, 0x28, 0x40, 0x74, 0x60, 0xE0, 0xC5, 0xC0, 0xF9, |
|||
0x08, 0x42, 0x10, 0x80, 0x8C, 0x63, 0x18, 0xC5, 0xC0, 0x8C, 0x54, 0xA5, |
|||
0x10, 0x80, 0x86, 0xDB, 0x5E, 0x49, 0x24, 0x80, 0x8A, 0x94, 0x45, 0x2A, |
|||
0x20, 0x8A, 0x94, 0x42, 0x10, 0x80, 0xF8, 0x84, 0x44, 0x23, 0xE0, 0xEA, |
|||
0xAA, 0xC0, 0x82, 0x10, 0x42, 0x08, 0x41, 0xD5, 0x55, 0xC0, 0x22, 0xA2, |
|||
0xFC, 0x90, 0xF0, 0x5F, 0x1F, 0x80, 0x84, 0x21, 0xE8, 0xC6, 0x3E, 0x78, |
|||
0x88, 0x70, 0x08, 0x42, 0xF8, 0xC6, 0x2F, 0x74, 0x7F, 0x07, 0x80, 0x34, |
|||
0x4F, 0x44, 0x44, 0x7C, 0x63, 0x17, 0x85, 0xC0, 0x84, 0x21, 0x6C, 0xC6, |
|||
0x31, 0x20, 0x00, 0xC2, 0x10, 0x9F, 0x20, 0x72, 0x49, 0x38, 0x84, 0x21, |
|||
0x2A, 0x72, 0x51, 0xE1, 0x08, 0x42, 0x10, 0x83, 0xFD, 0x6B, 0x5A, 0x80, |
|||
0xB6, 0x63, 0x18, 0x80, 0x74, 0x63, 0x17, 0x00, 0xF4, 0x63, 0x1F, 0x42, |
|||
0x00, 0x7C, 0x63, 0x17, 0x84, 0x20, 0xF9, 0x88, 0x80, 0x7C, 0x1E, 0x1F, |
|||
0x00, 0x44, 0xF4, 0x44, 0x70, 0x8C, 0x63, 0x17, 0x80, 0x8A, 0x94, 0xA2, |
|||
0x00, 0x8D, 0x54, 0xA5, 0x00, 0xDA, 0x88, 0xAD, 0x80, 0x8A, 0x94, 0x42, |
|||
0x13, 0x00, 0xF8, 0x88, 0x8F, 0x80, 0x32, 0x22, 0xC2, 0x22, 0x30, 0xFF, |
|||
0xC0, 0xC4, 0x44, 0x34, 0x44, 0xC0, 0xE0, 0xC0 }; |
|||
|
|||
const GFXglyph DejaVuSansMono5pt7bGlyphs[] PROGMEM = { |
|||
{ 0, 1, 1, 6, 0, 0 }, // 0x20 ' '
|
|||
{ 1, 1, 7, 6, 3, -6 }, // 0x21 '!'
|
|||
{ 2, 3, 3, 6, 2, -6 }, // 0x22 '"'
|
|||
{ 4, 6, 7, 6, 0, -6 }, // 0x23 '#'
|
|||
{ 10, 5, 8, 6, 1, -6 }, // 0x24 '$'
|
|||
{ 15, 6, 7, 6, 0, -6 }, // 0x25 '%'
|
|||
{ 21, 5, 7, 6, 1, -6 }, // 0x26 '&'
|
|||
{ 26, 1, 3, 6, 3, -6 }, // 0x27 '''
|
|||
{ 27, 2, 9, 6, 2, -7 }, // 0x28 '('
|
|||
{ 30, 2, 9, 6, 2, -7 }, // 0x29 ')'
|
|||
{ 33, 5, 4, 6, 1, -6 }, // 0x2A '*'
|
|||
{ 36, 5, 5, 6, 1, -5 }, // 0x2B '+'
|
|||
{ 40, 1, 3, 6, 2, 0 }, // 0x2C ','
|
|||
{ 41, 3, 1, 6, 2, -2 }, // 0x2D '-'
|
|||
{ 42, 1, 1, 6, 2, 0 }, // 0x2E '.'
|
|||
{ 43, 5, 8, 6, 1, -6 }, // 0x2F '/'
|
|||
{ 48, 5, 7, 6, 1, -6 }, // 0x30 '0'
|
|||
{ 53, 5, 7, 6, 1, -6 }, // 0x31 '1'
|
|||
{ 58, 5, 7, 6, 1, -6 }, // 0x32 '2'
|
|||
{ 63, 5, 7, 6, 1, -6 }, // 0x33 '3'
|
|||
{ 68, 5, 7, 6, 1, -6 }, // 0x34 '4'
|
|||
{ 73, 5, 7, 6, 1, -6 }, // 0x35 '5'
|
|||
{ 78, 5, 7, 6, 1, -6 }, // 0x36 '6'
|
|||
{ 83, 5, 7, 6, 1, -6 }, // 0x37 '7'
|
|||
{ 88, 5, 7, 6, 1, -6 }, // 0x38 '8'
|
|||
{ 93, 5, 7, 6, 1, -6 }, // 0x39 '9'
|
|||
{ 98, 1, 5, 6, 2, -4 }, // 0x3A ':'
|
|||
{ 99, 1, 7, 6, 2, -4 }, // 0x3B ';'
|
|||
{ 100, 5, 5, 6, 1, -5 }, // 0x3C '<'
|
|||
{ 104, 5, 3, 6, 0, -4 }, // 0x3D '='
|
|||
{ 106, 5, 5, 6, 1, -5 }, // 0x3E '>'
|
|||
{ 110, 4, 7, 6, 1, -6 }, // 0x3F '?'
|
|||
{ 114, 5, 9, 6, 1, -6 }, // 0x40 '@'
|
|||
{ 120, 5, 7, 6, 1, -6 }, // 0x41 'A'
|
|||
{ 125, 5, 7, 6, 1, -6 }, // 0x42 'B'
|
|||
{ 130, 5, 7, 6, 1, -6 }, // 0x43 'C'
|
|||
{ 135, 5, 7, 6, 1, -6 }, // 0x44 'D'
|
|||
{ 140, 5, 7, 6, 1, -6 }, // 0x45 'E'
|
|||
{ 145, 5, 7, 6, 1, -6 }, // 0x46 'F'
|
|||
{ 150, 5, 7, 6, 1, -6 }, // 0x47 'G'
|
|||
{ 155, 5, 7, 6, 1, -6 }, // 0x48 'H'
|
|||
{ 160, 5, 7, 6, 1, -6 }, // 0x49 'I'
|
|||
{ 165, 4, 7, 6, 1, -6 }, // 0x4A 'J'
|
|||
{ 169, 5, 7, 6, 1, -6 }, // 0x4B 'K'
|
|||
{ 174, 5, 7, 6, 1, -6 }, // 0x4C 'L'
|
|||
{ 179, 5, 7, 6, 1, -6 }, // 0x4D 'M'
|
|||
{ 184, 5, 7, 6, 1, -6 }, // 0x4E 'N'
|
|||
{ 189, 5, 7, 6, 1, -6 }, // 0x4F 'O'
|
|||
{ 194, 5, 7, 6, 1, -6 }, // 0x50 'P'
|
|||
{ 199, 5, 8, 6, 1, -6 }, // 0x51 'Q'
|
|||
{ 204, 6, 7, 6, 1, -6 }, // 0x52 'R'
|
|||
{ 210, 5, 7, 6, 1, -6 }, // 0x53 'S'
|
|||
{ 215, 5, 7, 6, 1, -6 }, // 0x54 'T'
|
|||
{ 220, 5, 7, 6, 1, -6 }, // 0x55 'U'
|
|||
{ 225, 5, 7, 6, 1, -6 }, // 0x56 'V'
|
|||
{ 230, 6, 7, 6, 0, -6 }, // 0x57 'W'
|
|||
{ 236, 5, 7, 6, 1, -6 }, // 0x58 'X'
|
|||
{ 241, 5, 7, 6, 1, -6 }, // 0x59 'Y'
|
|||
{ 246, 5, 7, 6, 1, -6 }, // 0x5A 'Z'
|
|||
{ 251, 2, 9, 6, 2, -7 }, // 0x5B '['
|
|||
{ 254, 5, 8, 6, 1, -6 }, // 0x5C '\'
|
|||
{ 259, 2, 9, 6, 2, -7 }, // 0x5D ']'
|
|||
{ 262, 5, 3, 6, 0, -6 }, // 0x5E '^'
|
|||
{ 264, 6, 1, 6, 0, 2 }, // 0x5F '_'
|
|||
{ 265, 2, 2, 6, 1, -7 }, // 0x60 '`'
|
|||
{ 266, 5, 5, 6, 1, -4 }, // 0x61 'a'
|
|||
{ 270, 5, 8, 6, 1, -7 }, // 0x62 'b'
|
|||
{ 275, 4, 5, 6, 1, -4 }, // 0x63 'c'
|
|||
{ 278, 5, 8, 6, 1, -7 }, // 0x64 'd'
|
|||
{ 283, 5, 5, 6, 1, -4 }, // 0x65 'e'
|
|||
{ 287, 4, 8, 6, 1, -7 }, // 0x66 'f'
|
|||
{ 291, 5, 7, 6, 1, -4 }, // 0x67 'g'
|
|||
{ 296, 5, 8, 6, 1, -7 }, // 0x68 'h'
|
|||
{ 301, 5, 8, 6, 1, -7 }, // 0x69 'i'
|
|||
{ 306, 3, 10, 6, 1, -7 }, // 0x6A 'j'
|
|||
{ 310, 5, 8, 6, 1, -7 }, // 0x6B 'k'
|
|||
{ 315, 5, 8, 6, 0, -7 }, // 0x6C 'l'
|
|||
{ 320, 5, 5, 6, 1, -4 }, // 0x6D 'm'
|
|||
{ 324, 5, 5, 6, 1, -4 }, // 0x6E 'n'
|
|||
{ 328, 5, 5, 6, 1, -4 }, // 0x6F 'o'
|
|||
{ 332, 5, 7, 6, 1, -4 }, // 0x70 'p'
|
|||
{ 337, 5, 7, 6, 1, -4 }, // 0x71 'q'
|
|||
{ 342, 4, 5, 6, 2, -4 }, // 0x72 'r'
|
|||
{ 345, 5, 5, 6, 1, -4 }, // 0x73 's'
|
|||
{ 349, 4, 7, 6, 1, -6 }, // 0x74 't'
|
|||
{ 353, 5, 5, 6, 1, -4 }, // 0x75 'u'
|
|||
{ 357, 5, 5, 6, 1, -4 }, // 0x76 'v'
|
|||
{ 361, 5, 5, 6, 1, -4 }, // 0x77 'w'
|
|||
{ 365, 5, 5, 6, 1, -4 }, // 0x78 'x'
|
|||
{ 369, 5, 7, 6, 1, -4 }, // 0x79 'y'
|
|||
{ 374, 5, 5, 6, 1, -4 }, // 0x7A 'z'
|
|||
{ 378, 4, 9, 6, 1, -7 }, // 0x7B '{'
|
|||
{ 383, 1, 10, 6, 3, -7 }, // 0x7C '|'
|
|||
{ 385, 4, 9, 6, 2, -7 }, // 0x7D '}'
|
|||
{ 390, 5, 2, 6, 1, -3 } }; // 0x7E '~'
|
|||
|
|||
const GFXfont DejaVuSansMono5pt7b PROGMEM = { |
|||
(uint8_t *)DejaVuSansMono5pt7bBitmaps, |
|||
(GFXglyph *)DejaVuSansMono5pt7bGlyphs, |
|||
0x20, 0x7E, 11 }; |
|||
|
|||
// Approx. 1064 bytes
|
@ -0,0 +1 @@ |
|||
gui |
@ -0,0 +1,71 @@ |
|||
package main |
|||
|
|||
import ( |
|||
"fmt" |
|||
"fyne.io/fyne/v2/app" |
|||
"fyne.io/fyne/v2/container" |
|||
"fyne.io/fyne/v2/widget" |
|||
"github.com/jnovack/flag" |
|||
log "github.com/sirupsen/logrus" |
|||
"os" |
|||
) |
|||
|
|||
var password string |
|||
var trx int |
|||
var trace bool |
|||
var uri string |
|||
var trxname string |
|||
var ant1 string |
|||
var ant2 string |
|||
var ant3 string |
|||
|
|||
func usage() { |
|||
fmt.Printf("Usage of %s:\n", os.Args[0]) |
|||
flag.PrintDefaults() |
|||
} |
|||
|
|||
func init() { |
|||
flag.StringVar(&password, "password", "", "your password") |
|||
flag.StringVar(&uri, "uri", "http://http-exporter", "uri to your http-exporter") |
|||
flag.IntVar(&trx, "trx", -1, "connected trx port on s.a.m.") |
|||
flag.BoolVar(&trace, "trace", false, "log almost everything") |
|||
flag.Parse() |
|||
if password == "" || uri == "" || trx == -1 { |
|||
usage() |
|||
os.Exit(1) |
|||
} |
|||
if trace { |
|||
log.SetLevel(log.TraceLevel) |
|||
log.Info("trace logging enabled") |
|||
} else { |
|||
log.Info("normal logging enabled") |
|||
} |
|||
|
|||
// FIXME
|
|||
log.Info("[fake] getting name from s.a.m. server..") |
|||
trxname = "KX3" |
|||
ant1 = "HF-P1 40m" |
|||
ant2 = "GP 20/15/10m" |
|||
ant3 = "2m Eggbeater" |
|||
} |
|||
|
|||
func main() { |
|||
a := app.New() |
|||
w := a.NewWindow("Antenna Switcher") |
|||
|
|||
hello := widget.NewLabel("just started..") |
|||
w.SetContent(container.NewVBox( |
|||
hello, |
|||
widget.NewButton(ant1, func() { |
|||
hello.SetText(fmt.Sprintf("%s : %s", trxname, ant1)) |
|||
}), |
|||
widget.NewButton(ant2, func() { |
|||
hello.SetText(fmt.Sprintf("%s : %s", trxname, ant2)) |
|||
}), |
|||
widget.NewButton(ant3, func() { |
|||
hello.SetText(fmt.Sprintf("%s : %s", trxname, ant3)) |
|||
}), |
|||
)) |
|||
|
|||
w.ShowAndRun() |
|||
} |
Loading…
Reference in new issue