Merge branch 'master' of github.com:r0ket/r0ket
This commit is contained in:
commit
27793d76a5
|
@ -180,6 +180,7 @@ struct MENU {
|
||||||
};
|
};
|
||||||
|
|
||||||
#define MENU_TIMEOUT (1<<0)
|
#define MENU_TIMEOUT (1<<0)
|
||||||
|
#define MENU_JUSTONCE (1<<1)
|
||||||
extern uint8_t menuflags;
|
extern uint8_t menuflags;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -68,6 +68,10 @@ void handleMenu(const struct MENU *the_menu) {
|
||||||
case BTN_RIGHT:
|
case BTN_RIGHT:
|
||||||
if (the_menu->entries[menuselection].callback!=NULL)
|
if (the_menu->entries[menuselection].callback!=NULL)
|
||||||
the_menu->entries[menuselection].callback();
|
the_menu->entries[menuselection].callback();
|
||||||
|
|
||||||
|
if (menuflags&MENU_JUSTONCE)
|
||||||
|
return;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case BTN_ENTER:
|
case BTN_ENTER:
|
||||||
lcdClear();
|
lcdClear();
|
||||||
|
@ -77,6 +81,10 @@ void handleMenu(const struct MENU *the_menu) {
|
||||||
if (the_menu->entries[menuselection].callback!=NULL)
|
if (the_menu->entries[menuselection].callback!=NULL)
|
||||||
the_menu->entries[menuselection].callback();
|
the_menu->entries[menuselection].callback();
|
||||||
lcdRefresh();
|
lcdRefresh();
|
||||||
|
|
||||||
|
if (menuflags&MENU_JUSTONCE)
|
||||||
|
return;
|
||||||
|
|
||||||
getInputWait();
|
getInputWait();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -0,0 +1,53 @@
|
||||||
|
#include <sysinit.h>
|
||||||
|
|
||||||
|
#include "basic/basic.h"
|
||||||
|
#include "basic/config.h"
|
||||||
|
|
||||||
|
#include "lcd/print.h"
|
||||||
|
#include "usetable.h"
|
||||||
|
|
||||||
|
static void set_privacy();
|
||||||
|
static void privacy0();
|
||||||
|
static void privacy1();
|
||||||
|
static void privacy2();
|
||||||
|
|
||||||
|
static const char levels[][12] = {"0-trackable","1-mesh only","2-RF OFF"};
|
||||||
|
|
||||||
|
static const struct MENU submenu_privacy={ "Privacy?", {
|
||||||
|
{ levels[0], &privacy0},
|
||||||
|
{ levels[1], &privacy1},
|
||||||
|
{ levels[2], &privacy2},
|
||||||
|
{NULL,NULL}
|
||||||
|
}};
|
||||||
|
|
||||||
|
void ram(void){
|
||||||
|
// check privacy
|
||||||
|
menuflags|=MENU_JUSTONCE;
|
||||||
|
if ((GLOBAL(privacy)!=3)) { //TODO Change!
|
||||||
|
handleMenu(&submenu_privacy);
|
||||||
|
}
|
||||||
|
|
||||||
|
menuflags&= (~MENU_JUSTONCE);
|
||||||
|
};
|
||||||
|
|
||||||
|
static void privacy0() {
|
||||||
|
set_privacy(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void privacy1() {
|
||||||
|
set_privacy(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void privacy2() {
|
||||||
|
set_privacy(2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void set_privacy(int level) {
|
||||||
|
lcdClear();
|
||||||
|
lcdPrintln("Privacy:");
|
||||||
|
lcdPrintln(levels[level]);
|
||||||
|
lcdRefresh();
|
||||||
|
getInput();
|
||||||
|
GLOBAL(privacy) = level;
|
||||||
|
}
|
||||||
|
|
|
@ -3,6 +3,8 @@ all : tui gui
|
||||||
.PHONY : tui gui tui-core clean
|
.PHONY : tui gui tui-core clean
|
||||||
|
|
||||||
tui-core :
|
tui-core :
|
||||||
|
$(MAKE) -C ../firmware/l0dable usetable.h
|
||||||
|
cd ..; $(SHELL) simulat0r/bin/update-bridge-files.sh
|
||||||
$(MAKE) -C firmware
|
$(MAKE) -C firmware
|
||||||
$(MAKE) -C simcore
|
$(MAKE) -C simcore
|
||||||
$(MAKE) -C tui
|
$(MAKE) -C tui
|
||||||
|
|
|
@ -22,7 +22,7 @@ fi
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "Updating bridge files for C source"
|
echo "Updating bridge files for C source"
|
||||||
for i in `find firmware/ \! -path firmware/lcd/allfonts.h -type f -iname \*.[ch]`
|
for i in `find firmware/ \! -path firmware/lcd/allfonts.h \! -path firmware/l0dable/usetable.h -type f -iname \*.[ch]`
|
||||||
do
|
do
|
||||||
if test -f simulat0r/$i;
|
if test -f simulat0r/$i;
|
||||||
then
|
then
|
||||||
|
@ -45,10 +45,13 @@ do
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if cmp firmware/.gitignore simulat0r/firmware/.gitignore;
|
|
||||||
then
|
for i in `find firmware -type f -name .gitignore`; do
|
||||||
echo OK .gitignore is the same in firmware/ and simulat0r/firmware
|
if cmp $i simulat0r/$i
|
||||||
else
|
then
|
||||||
echo WARNING: .gitignore mismatch in firmware/ and simulat0r/firmware
|
echo OK $i and simulat0r/$i are the same
|
||||||
diff -y firmware/.gitignore simulat0r/firmware/.gitignore
|
else
|
||||||
fi
|
echo WARNING: $i mismatches simulat0r/$i
|
||||||
|
diff -y $i simulat0r/$i
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
|
@ -4,3 +4,5 @@ lpc1xxx/memory.ld
|
||||||
applications/wrapper.c
|
applications/wrapper.c
|
||||||
lcd/allfonts.h
|
lcd/allfonts.h
|
||||||
Makefile.dep
|
Makefile.dep
|
||||||
|
table.c
|
||||||
|
table.h
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
*.gen
|
|
@ -1,2 +0,0 @@
|
||||||
/* AUTOGENERATED SOURCE FILE */
|
|
||||||
#include "../../../firmware/applications/executor.c"
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
/* AUTOGENERATED SOURCE FILE */
|
||||||
|
#include "../../../firmware/applications/final.c"
|
|
@ -0,0 +1,2 @@
|
||||||
|
/* AUTOGENERATED SOURCE FILE */
|
||||||
|
#include "../../../../firmware/applications/final/beacon.c"
|
|
@ -0,0 +1,2 @@
|
||||||
|
/* AUTOGENERATED SOURCE FILE */
|
||||||
|
#include "../../../../firmware/applications/final/config.c"
|
|
@ -0,0 +1,2 @@
|
||||||
|
/* AUTOGENERATED SOURCE FILE */
|
||||||
|
#include "../../../../firmware/applications/final/exe.c"
|
|
@ -0,0 +1,2 @@
|
||||||
|
/* AUTOGENERATED SOURCE FILE */
|
||||||
|
#include "../../../../firmware/applications/final/flame.c"
|
|
@ -0,0 +1,2 @@
|
||||||
|
/* AUTOGENERATED SOURCE FILE */
|
||||||
|
#include "../../../../firmware/applications/final/mesh.c"
|
|
@ -0,0 +1,2 @@
|
||||||
|
/* AUTOGENERATED SOURCE FILE */
|
||||||
|
#include "../../../../firmware/applications/final/nickname.c"
|
|
@ -0,0 +1,2 @@
|
||||||
|
/* AUTOGENERATED SOURCE FILE */
|
||||||
|
#include "../../../../firmware/applications/final/util.c"
|
|
@ -1,2 +0,0 @@
|
||||||
/* AUTOGENERATED SOURCE FILE */
|
|
||||||
#include "../../../firmware/applications/funk.c"
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
/* AUTOGENERATED SOURCE FILE */
|
||||||
|
#include "../../../firmware/applications/l0dable.c"
|
|
@ -1,2 +0,0 @@
|
||||||
/* AUTOGENERATED SOURCE FILE */
|
|
||||||
#include "../../../firmware/applications/mandelbrot.c"
|
|
|
@ -1,2 +0,0 @@
|
||||||
/* AUTOGENERATED SOURCE FILE */
|
|
||||||
#include "../../../firmware/applications/mandelbrot2.c"
|
|
|
@ -1 +0,0 @@
|
||||||
#include "../../../firmware/applications/rect.c"
|
|
|
@ -1,2 +0,0 @@
|
||||||
/* AUTOGENERATED SOURCE FILE */
|
|
||||||
#include "../../../firmware/applications/remote.c"
|
|
|
@ -1,2 +0,0 @@
|
||||||
/* AUTOGENERATED SOURCE FILE */
|
|
||||||
#include "../../../../firmware/applications/serial/config.c"
|
|
|
@ -1,2 +0,0 @@
|
||||||
/* AUTOGENERATED SOURCE FILE */
|
|
||||||
#include "../../../../firmware/applications/serial/remote.c"
|
|
|
@ -1,2 +0,0 @@
|
||||||
/* AUTOGENERATED SOURCE FILE */
|
|
||||||
#include "../../../../firmware/applications/serial/uuid.c"
|
|
|
@ -1,2 +0,0 @@
|
||||||
/* AUTOGENERATED SOURCE FILE */
|
|
||||||
#include "../../../firmware/applications/spaceinvaders.c"
|
|
|
@ -1,2 +0,0 @@
|
||||||
/* AUTOGENERATED SOURCE FILE */
|
|
||||||
#include "../../../../firmware/applications/tester/config.c"
|
|
|
@ -1 +0,0 @@
|
||||||
#include "../../../firmware/applications/waldbrand.c"
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
*.elf
|
||||||
|
*.bin
|
||||||
|
usetable.h
|
||||||
|
loadable.ld
|
|
@ -0,0 +1,2 @@
|
||||||
|
# GENERATED INCLUDE BRIDGE/
|
||||||
|
include ../../../firmware/l0dable/Makefile
|
|
@ -0,0 +1,2 @@
|
||||||
|
/* AUTOGENERATED SOURCE FILE */
|
||||||
|
#include "../../../firmware/l0dable/blink.c"
|
|
@ -0,0 +1,2 @@
|
||||||
|
/* AUTOGENERATED SOURCE FILE */
|
||||||
|
#include "../../../firmware/l0dable/debug.c"
|
|
@ -0,0 +1,2 @@
|
||||||
|
/* AUTOGENERATED SOURCE FILE */
|
||||||
|
#include "../../../firmware/l0dable/invaders.c"
|
|
@ -0,0 +1,2 @@
|
||||||
|
/* AUTOGENERATED SOURCE FILE */
|
||||||
|
#include "../../../firmware/l0dable/mandel.c"
|
|
@ -0,0 +1,2 @@
|
||||||
|
/* AUTOGENERATED SOURCE FILE */
|
||||||
|
#include "../../../firmware/l0dable/recvcard.c"
|
|
@ -0,0 +1,2 @@
|
||||||
|
/* AUTOGENERATED SOURCE FILE */
|
||||||
|
#include "../../../firmware/l0dable/sendcard.c"
|
|
@ -0,0 +1,4 @@
|
||||||
|
*.elf
|
||||||
|
*.bin
|
||||||
|
*.h
|
||||||
|
loadable.ld
|
|
@ -1,2 +0,0 @@
|
||||||
/* AUTOGENERATED SOURCE FILE */
|
|
||||||
#include "../../../firmware/loadable/blinktest2.c"
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
/* AUTOGENERATED SOURCE FILE */
|
||||||
|
#include "../../../firmware/loadable/mandelbrot.c"
|
|
@ -0,0 +1,2 @@
|
||||||
|
/* AUTOGENERATED SOURCE FILE */
|
||||||
|
#include "../../../firmware/loadable/recvcard.c"
|
|
@ -0,0 +1,2 @@
|
||||||
|
/* AUTOGENERATED SOURCE FILE */
|
||||||
|
#include "../../../firmware/loadable/sendcard.c"
|
|
@ -37,6 +37,7 @@ set(FIRMWARE_OBJS
|
||||||
../simcore/simcore.o
|
../simcore/simcore.o
|
||||||
../simcore/misc.o
|
../simcore/misc.o
|
||||||
../simcore/timecounter.o
|
../simcore/timecounter.o
|
||||||
|
../firmware/table.o
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,8 @@ LIBS += ../firmware/basic/libbasic.a
|
||||||
|
|
||||||
OBJS+=../simcore/simcore.o ../simcore/misc.o ../simcore/timecounter.o
|
OBJS+=../simcore/simcore.o ../simcore/misc.o ../simcore/timecounter.o
|
||||||
|
|
||||||
|
OBJS += ../firmware/table.o
|
||||||
|
|
||||||
OBJS += simulat0r.o
|
OBJS += simulat0r.o
|
||||||
|
|
||||||
.PHONY : all
|
.PHONY : all
|
||||||
|
|
Loading…
Reference in New Issue