From e32693aad264f7db42988dd7bc2549a2c90474a7 Mon Sep 17 00:00:00 2001 From: bernd Date: Wed, 3 Aug 2011 14:05:03 +0200 Subject: [PATCH 01/13] removed simulat0r bridge files due to removed r0ket sources --- simulat0r/firmware/applications/executor.c | 2 -- simulat0r/firmware/applications/funk.c | 2 -- simulat0r/firmware/applications/mandelbrot.c | 2 -- simulat0r/firmware/applications/mandelbrot2.c | 2 -- simulat0r/firmware/applications/rect.c | 1 - simulat0r/firmware/applications/remote.c | 2 -- simulat0r/firmware/applications/serial/config.c | 2 -- simulat0r/firmware/applications/serial/remote.c | 2 -- simulat0r/firmware/applications/serial/uuid.c | 2 -- simulat0r/firmware/applications/spaceinvaders.c | 2 -- simulat0r/firmware/applications/tester/config.c | 2 -- simulat0r/firmware/applications/waldbrand.c | 1 - simulat0r/firmware/loadable/blinktest2.c | 2 -- 13 files changed, 24 deletions(-) delete mode 100644 simulat0r/firmware/applications/executor.c delete mode 100644 simulat0r/firmware/applications/funk.c delete mode 100644 simulat0r/firmware/applications/mandelbrot.c delete mode 100644 simulat0r/firmware/applications/mandelbrot2.c delete mode 100644 simulat0r/firmware/applications/rect.c delete mode 100644 simulat0r/firmware/applications/remote.c delete mode 100644 simulat0r/firmware/applications/serial/config.c delete mode 100644 simulat0r/firmware/applications/serial/remote.c delete mode 100644 simulat0r/firmware/applications/serial/uuid.c delete mode 100644 simulat0r/firmware/applications/spaceinvaders.c delete mode 100644 simulat0r/firmware/applications/tester/config.c delete mode 100644 simulat0r/firmware/applications/waldbrand.c delete mode 100644 simulat0r/firmware/loadable/blinktest2.c diff --git a/simulat0r/firmware/applications/executor.c b/simulat0r/firmware/applications/executor.c deleted file mode 100644 index c1a0092..0000000 --- a/simulat0r/firmware/applications/executor.c +++ /dev/null @@ -1,2 +0,0 @@ -/* AUTOGENERATED SOURCE FILE */ -#include "../../../firmware/applications/executor.c" diff --git a/simulat0r/firmware/applications/funk.c b/simulat0r/firmware/applications/funk.c deleted file mode 100644 index 75cbee3..0000000 --- a/simulat0r/firmware/applications/funk.c +++ /dev/null @@ -1,2 +0,0 @@ -/* AUTOGENERATED SOURCE FILE */ -#include "../../../firmware/applications/funk.c" diff --git a/simulat0r/firmware/applications/mandelbrot.c b/simulat0r/firmware/applications/mandelbrot.c deleted file mode 100644 index 9923b38..0000000 --- a/simulat0r/firmware/applications/mandelbrot.c +++ /dev/null @@ -1,2 +0,0 @@ -/* AUTOGENERATED SOURCE FILE */ -#include "../../../firmware/applications/mandelbrot.c" diff --git a/simulat0r/firmware/applications/mandelbrot2.c b/simulat0r/firmware/applications/mandelbrot2.c deleted file mode 100644 index 2b68734..0000000 --- a/simulat0r/firmware/applications/mandelbrot2.c +++ /dev/null @@ -1,2 +0,0 @@ -/* AUTOGENERATED SOURCE FILE */ -#include "../../../firmware/applications/mandelbrot2.c" diff --git a/simulat0r/firmware/applications/rect.c b/simulat0r/firmware/applications/rect.c deleted file mode 100644 index 9d526bd..0000000 --- a/simulat0r/firmware/applications/rect.c +++ /dev/null @@ -1 +0,0 @@ -#include "../../../firmware/applications/rect.c" diff --git a/simulat0r/firmware/applications/remote.c b/simulat0r/firmware/applications/remote.c deleted file mode 100644 index eb451fe..0000000 --- a/simulat0r/firmware/applications/remote.c +++ /dev/null @@ -1,2 +0,0 @@ -/* AUTOGENERATED SOURCE FILE */ -#include "../../../firmware/applications/remote.c" diff --git a/simulat0r/firmware/applications/serial/config.c b/simulat0r/firmware/applications/serial/config.c deleted file mode 100644 index 611fc4b..0000000 --- a/simulat0r/firmware/applications/serial/config.c +++ /dev/null @@ -1,2 +0,0 @@ -/* AUTOGENERATED SOURCE FILE */ -#include "../../../../firmware/applications/serial/config.c" diff --git a/simulat0r/firmware/applications/serial/remote.c b/simulat0r/firmware/applications/serial/remote.c deleted file mode 100644 index 965b79e..0000000 --- a/simulat0r/firmware/applications/serial/remote.c +++ /dev/null @@ -1,2 +0,0 @@ -/* AUTOGENERATED SOURCE FILE */ -#include "../../../../firmware/applications/serial/remote.c" diff --git a/simulat0r/firmware/applications/serial/uuid.c b/simulat0r/firmware/applications/serial/uuid.c deleted file mode 100644 index d04a944..0000000 --- a/simulat0r/firmware/applications/serial/uuid.c +++ /dev/null @@ -1,2 +0,0 @@ -/* AUTOGENERATED SOURCE FILE */ -#include "../../../../firmware/applications/serial/uuid.c" diff --git a/simulat0r/firmware/applications/spaceinvaders.c b/simulat0r/firmware/applications/spaceinvaders.c deleted file mode 100644 index ff36beb..0000000 --- a/simulat0r/firmware/applications/spaceinvaders.c +++ /dev/null @@ -1,2 +0,0 @@ -/* AUTOGENERATED SOURCE FILE */ -#include "../../../firmware/applications/spaceinvaders.c" diff --git a/simulat0r/firmware/applications/tester/config.c b/simulat0r/firmware/applications/tester/config.c deleted file mode 100644 index 6b24bef..0000000 --- a/simulat0r/firmware/applications/tester/config.c +++ /dev/null @@ -1,2 +0,0 @@ -/* AUTOGENERATED SOURCE FILE */ -#include "../../../../firmware/applications/tester/config.c" diff --git a/simulat0r/firmware/applications/waldbrand.c b/simulat0r/firmware/applications/waldbrand.c deleted file mode 100644 index 91da7b6..0000000 --- a/simulat0r/firmware/applications/waldbrand.c +++ /dev/null @@ -1 +0,0 @@ -#include "../../../firmware/applications/waldbrand.c" diff --git a/simulat0r/firmware/loadable/blinktest2.c b/simulat0r/firmware/loadable/blinktest2.c deleted file mode 100644 index ebd11b7..0000000 --- a/simulat0r/firmware/loadable/blinktest2.c +++ /dev/null @@ -1,2 +0,0 @@ -/* AUTOGENERATED SOURCE FILE */ -#include "../../../firmware/loadable/blinktest2.c" From 9b7580777f7e353f6d7775051868cdb6cb287bfc Mon Sep 17 00:00:00 2001 From: bernd Date: Thu, 4 Aug 2011 13:52:51 +0200 Subject: [PATCH 02/13] Check all .gitignore files in simulat0r --- simulat0r/bin/update-bridge-files.sh | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/simulat0r/bin/update-bridge-files.sh b/simulat0r/bin/update-bridge-files.sh index 3d801a2..8b40a7b 100755 --- a/simulat0r/bin/update-bridge-files.sh +++ b/simulat0r/bin/update-bridge-files.sh @@ -45,10 +45,13 @@ do fi done -if cmp firmware/.gitignore simulat0r/firmware/.gitignore; -then - echo OK .gitignore is the same in firmware/ and simulat0r/firmware -else - echo WARNING: .gitignore mismatch in firmware/ and simulat0r/firmware - diff -y firmware/.gitignore simulat0r/firmware/.gitignore -fi + +for i in `find firmware -type f -name .gitignore`; do + if cmp $i simulat0r/$i + then + echo OK $i and simulat0r/$i are the same + else + echo WARNING: $i mismatches simulat0r/$i + diff -y $i simulat0r/$i + fi +done From d4ee7554d8ff1bbe4a381b65c486a8df8e15bf2c Mon Sep 17 00:00:00 2001 From: bernd Date: Thu, 4 Aug 2011 14:10:11 +0200 Subject: [PATCH 03/13] Ignore autogenerated file l0dable/usetable.h Actually should ignore all .gitignore files somewhen... --- simulat0r/bin/update-bridge-files.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simulat0r/bin/update-bridge-files.sh b/simulat0r/bin/update-bridge-files.sh index 8b40a7b..76db0b4 100755 --- a/simulat0r/bin/update-bridge-files.sh +++ b/simulat0r/bin/update-bridge-files.sh @@ -22,7 +22,7 @@ fi done 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 if test -f simulat0r/$i; then From 1a8d44470b5a303c69a3bbf7e2de5187843c318a Mon Sep 17 00:00:00 2001 From: bernd Date: Thu, 4 Aug 2011 14:12:32 +0200 Subject: [PATCH 04/13] Added table.[ch] to follow r0ket .gitignore --- simulat0r/firmware/.gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/simulat0r/firmware/.gitignore b/simulat0r/firmware/.gitignore index ca10624..5323c83 100644 --- a/simulat0r/firmware/.gitignore +++ b/simulat0r/firmware/.gitignore @@ -4,3 +4,5 @@ lpc1xxx/memory.ld applications/wrapper.c lcd/allfonts.h Makefile.dep +table.c +table.h From fd730c0f7505b7e821675b7861f05e63266dfdf7 Mon Sep 17 00:00:00 2001 From: bernd Date: Thu, 4 Aug 2011 14:13:02 +0200 Subject: [PATCH 05/13] Added linking with table.o --- simulat0r/gui/CMakeLists.txt | 1 + simulat0r/tui/Makefile | 2 ++ 2 files changed, 3 insertions(+) diff --git a/simulat0r/gui/CMakeLists.txt b/simulat0r/gui/CMakeLists.txt index 8837e88..6df5f86 100644 --- a/simulat0r/gui/CMakeLists.txt +++ b/simulat0r/gui/CMakeLists.txt @@ -37,6 +37,7 @@ set(FIRMWARE_OBJS ../simcore/simcore.o ../simcore/misc.o ../simcore/timecounter.o +../firmware/table.o ) diff --git a/simulat0r/tui/Makefile b/simulat0r/tui/Makefile index a66ec02..a74e2f7 100644 --- a/simulat0r/tui/Makefile +++ b/simulat0r/tui/Makefile @@ -24,6 +24,8 @@ LIBS += ../firmware/basic/libbasic.a OBJS+=../simcore/simcore.o ../simcore/misc.o ../simcore/timecounter.o +OBJS += ../firmware/table.o + OBJS += simulat0r.o .PHONY : all From 309e8356d66626bea461b5db087c38156c93dff7 Mon Sep 17 00:00:00 2001 From: bernd Date: Thu, 4 Aug 2011 14:14:39 +0200 Subject: [PATCH 06/13] Added some more bridge files to bring new r0ket sources into simulat0r --- simulat0r/firmware/applications/final.c | 2 ++ simulat0r/firmware/applications/l0dable.c | 2 ++ simulat0r/firmware/loadable/mandelbrot.c | 2 ++ simulat0r/firmware/loadable/recvcard.c | 2 ++ simulat0r/firmware/loadable/sendcard.c | 2 ++ 5 files changed, 10 insertions(+) create mode 100644 simulat0r/firmware/applications/final.c create mode 100644 simulat0r/firmware/applications/l0dable.c create mode 100644 simulat0r/firmware/loadable/mandelbrot.c create mode 100644 simulat0r/firmware/loadable/recvcard.c create mode 100644 simulat0r/firmware/loadable/sendcard.c diff --git a/simulat0r/firmware/applications/final.c b/simulat0r/firmware/applications/final.c new file mode 100644 index 0000000..62a5070 --- /dev/null +++ b/simulat0r/firmware/applications/final.c @@ -0,0 +1,2 @@ +/* AUTOGENERATED SOURCE FILE */ +#include "../../../firmware/applications/final.c" diff --git a/simulat0r/firmware/applications/l0dable.c b/simulat0r/firmware/applications/l0dable.c new file mode 100644 index 0000000..612b851 --- /dev/null +++ b/simulat0r/firmware/applications/l0dable.c @@ -0,0 +1,2 @@ +/* AUTOGENERATED SOURCE FILE */ +#include "../../../firmware/applications/l0dable.c" diff --git a/simulat0r/firmware/loadable/mandelbrot.c b/simulat0r/firmware/loadable/mandelbrot.c new file mode 100644 index 0000000..16adec1 --- /dev/null +++ b/simulat0r/firmware/loadable/mandelbrot.c @@ -0,0 +1,2 @@ +/* AUTOGENERATED SOURCE FILE */ +#include "../../../firmware/loadable/mandelbrot.c" diff --git a/simulat0r/firmware/loadable/recvcard.c b/simulat0r/firmware/loadable/recvcard.c new file mode 100644 index 0000000..d9eaba4 --- /dev/null +++ b/simulat0r/firmware/loadable/recvcard.c @@ -0,0 +1,2 @@ +/* AUTOGENERATED SOURCE FILE */ +#include "../../../firmware/loadable/recvcard.c" diff --git a/simulat0r/firmware/loadable/sendcard.c b/simulat0r/firmware/loadable/sendcard.c new file mode 100644 index 0000000..b8e3e4c --- /dev/null +++ b/simulat0r/firmware/loadable/sendcard.c @@ -0,0 +1,2 @@ +/* AUTOGENERATED SOURCE FILE */ +#include "../../../firmware/loadable/sendcard.c" From ebc4c4eca452d48df0af4cbf378750a3e80776dc Mon Sep 17 00:00:00 2001 From: bernd Date: Thu, 4 Aug 2011 14:32:03 +0200 Subject: [PATCH 07/13] Added .gitignore files --- simulat0r/firmware/applications/.gitignore | 1 + simulat0r/firmware/l0dable/.gitignore | 4 ++++ simulat0r/firmware/loadable/.gitignore | 4 ++++ 3 files changed, 9 insertions(+) create mode 100644 simulat0r/firmware/applications/.gitignore create mode 100644 simulat0r/firmware/l0dable/.gitignore create mode 100644 simulat0r/firmware/loadable/.gitignore diff --git a/simulat0r/firmware/applications/.gitignore b/simulat0r/firmware/applications/.gitignore new file mode 100644 index 0000000..0de4484 --- /dev/null +++ b/simulat0r/firmware/applications/.gitignore @@ -0,0 +1 @@ +*.gen diff --git a/simulat0r/firmware/l0dable/.gitignore b/simulat0r/firmware/l0dable/.gitignore new file mode 100644 index 0000000..ca79c34 --- /dev/null +++ b/simulat0r/firmware/l0dable/.gitignore @@ -0,0 +1,4 @@ +*.elf +*.bin +usetable.h +loadable.ld diff --git a/simulat0r/firmware/loadable/.gitignore b/simulat0r/firmware/loadable/.gitignore new file mode 100644 index 0000000..7652361 --- /dev/null +++ b/simulat0r/firmware/loadable/.gitignore @@ -0,0 +1,4 @@ +*.elf +*.bin +*.h +loadable.ld From d500cf0cbc844df3820ed0959fac50cbbf24433b Mon Sep 17 00:00:00 2001 From: bernd Date: Thu, 4 Aug 2011 14:32:33 +0200 Subject: [PATCH 08/13] Added some more bridge files to bring new r0ket sources into simulat0r --- simulat0r/firmware/applications/final/beacon.c | 2 ++ simulat0r/firmware/applications/final/config.c | 2 ++ simulat0r/firmware/applications/final/exe.c | 2 ++ simulat0r/firmware/applications/final/flame.c | 2 ++ simulat0r/firmware/applications/final/mesh.c | 2 ++ simulat0r/firmware/applications/final/nickname.c | 2 ++ simulat0r/firmware/applications/final/util.c | 2 ++ simulat0r/firmware/l0dable/Makefile | 2 ++ simulat0r/firmware/l0dable/blink.c | 2 ++ simulat0r/firmware/l0dable/debug.c | 2 ++ simulat0r/firmware/l0dable/invaders.c | 2 ++ simulat0r/firmware/l0dable/mandel.c | 2 ++ simulat0r/firmware/l0dable/recvcard.c | 2 ++ simulat0r/firmware/l0dable/sendcard.c | 2 ++ 14 files changed, 28 insertions(+) create mode 100644 simulat0r/firmware/applications/final/beacon.c create mode 100644 simulat0r/firmware/applications/final/config.c create mode 100644 simulat0r/firmware/applications/final/exe.c create mode 100644 simulat0r/firmware/applications/final/flame.c create mode 100644 simulat0r/firmware/applications/final/mesh.c create mode 100644 simulat0r/firmware/applications/final/nickname.c create mode 100644 simulat0r/firmware/applications/final/util.c create mode 100644 simulat0r/firmware/l0dable/Makefile create mode 100644 simulat0r/firmware/l0dable/blink.c create mode 100644 simulat0r/firmware/l0dable/debug.c create mode 100644 simulat0r/firmware/l0dable/invaders.c create mode 100644 simulat0r/firmware/l0dable/mandel.c create mode 100644 simulat0r/firmware/l0dable/recvcard.c create mode 100644 simulat0r/firmware/l0dable/sendcard.c diff --git a/simulat0r/firmware/applications/final/beacon.c b/simulat0r/firmware/applications/final/beacon.c new file mode 100644 index 0000000..5881f92 --- /dev/null +++ b/simulat0r/firmware/applications/final/beacon.c @@ -0,0 +1,2 @@ +/* AUTOGENERATED SOURCE FILE */ +#include "../../../../firmware/applications/final/beacon.c" diff --git a/simulat0r/firmware/applications/final/config.c b/simulat0r/firmware/applications/final/config.c new file mode 100644 index 0000000..1846014 --- /dev/null +++ b/simulat0r/firmware/applications/final/config.c @@ -0,0 +1,2 @@ +/* AUTOGENERATED SOURCE FILE */ +#include "../../../../firmware/applications/final/config.c" diff --git a/simulat0r/firmware/applications/final/exe.c b/simulat0r/firmware/applications/final/exe.c new file mode 100644 index 0000000..6e266fc --- /dev/null +++ b/simulat0r/firmware/applications/final/exe.c @@ -0,0 +1,2 @@ +/* AUTOGENERATED SOURCE FILE */ +#include "../../../../firmware/applications/final/exe.c" diff --git a/simulat0r/firmware/applications/final/flame.c b/simulat0r/firmware/applications/final/flame.c new file mode 100644 index 0000000..d80d372 --- /dev/null +++ b/simulat0r/firmware/applications/final/flame.c @@ -0,0 +1,2 @@ +/* AUTOGENERATED SOURCE FILE */ +#include "../../../../firmware/applications/final/flame.c" diff --git a/simulat0r/firmware/applications/final/mesh.c b/simulat0r/firmware/applications/final/mesh.c new file mode 100644 index 0000000..77f39a3 --- /dev/null +++ b/simulat0r/firmware/applications/final/mesh.c @@ -0,0 +1,2 @@ +/* AUTOGENERATED SOURCE FILE */ +#include "../../../../firmware/applications/final/mesh.c" diff --git a/simulat0r/firmware/applications/final/nickname.c b/simulat0r/firmware/applications/final/nickname.c new file mode 100644 index 0000000..ba6ecb5 --- /dev/null +++ b/simulat0r/firmware/applications/final/nickname.c @@ -0,0 +1,2 @@ +/* AUTOGENERATED SOURCE FILE */ +#include "../../../../firmware/applications/final/nickname.c" diff --git a/simulat0r/firmware/applications/final/util.c b/simulat0r/firmware/applications/final/util.c new file mode 100644 index 0000000..c3a0466 --- /dev/null +++ b/simulat0r/firmware/applications/final/util.c @@ -0,0 +1,2 @@ +/* AUTOGENERATED SOURCE FILE */ +#include "../../../../firmware/applications/final/util.c" diff --git a/simulat0r/firmware/l0dable/Makefile b/simulat0r/firmware/l0dable/Makefile new file mode 100644 index 0000000..b452536 --- /dev/null +++ b/simulat0r/firmware/l0dable/Makefile @@ -0,0 +1,2 @@ +# GENERATED INCLUDE BRIDGE/ +include ../../../firmware/l0dable/Makefile diff --git a/simulat0r/firmware/l0dable/blink.c b/simulat0r/firmware/l0dable/blink.c new file mode 100644 index 0000000..7b0acb4 --- /dev/null +++ b/simulat0r/firmware/l0dable/blink.c @@ -0,0 +1,2 @@ +/* AUTOGENERATED SOURCE FILE */ +#include "../../../firmware/l0dable/blink.c" diff --git a/simulat0r/firmware/l0dable/debug.c b/simulat0r/firmware/l0dable/debug.c new file mode 100644 index 0000000..e6e897b --- /dev/null +++ b/simulat0r/firmware/l0dable/debug.c @@ -0,0 +1,2 @@ +/* AUTOGENERATED SOURCE FILE */ +#include "../../../firmware/l0dable/debug.c" diff --git a/simulat0r/firmware/l0dable/invaders.c b/simulat0r/firmware/l0dable/invaders.c new file mode 100644 index 0000000..71f5722 --- /dev/null +++ b/simulat0r/firmware/l0dable/invaders.c @@ -0,0 +1,2 @@ +/* AUTOGENERATED SOURCE FILE */ +#include "../../../firmware/l0dable/invaders.c" diff --git a/simulat0r/firmware/l0dable/mandel.c b/simulat0r/firmware/l0dable/mandel.c new file mode 100644 index 0000000..6c54d19 --- /dev/null +++ b/simulat0r/firmware/l0dable/mandel.c @@ -0,0 +1,2 @@ +/* AUTOGENERATED SOURCE FILE */ +#include "../../../firmware/l0dable/mandel.c" diff --git a/simulat0r/firmware/l0dable/recvcard.c b/simulat0r/firmware/l0dable/recvcard.c new file mode 100644 index 0000000..a5e53bc --- /dev/null +++ b/simulat0r/firmware/l0dable/recvcard.c @@ -0,0 +1,2 @@ +/* AUTOGENERATED SOURCE FILE */ +#include "../../../firmware/l0dable/recvcard.c" diff --git a/simulat0r/firmware/l0dable/sendcard.c b/simulat0r/firmware/l0dable/sendcard.c new file mode 100644 index 0000000..0dabae1 --- /dev/null +++ b/simulat0r/firmware/l0dable/sendcard.c @@ -0,0 +1,2 @@ +/* AUTOGENERATED SOURCE FILE */ +#include "../../../firmware/l0dable/sendcard.c" From 590346be6b16350022b5bdd42ce801bb9d50e167 Mon Sep 17 00:00:00 2001 From: bernd Date: Thu, 4 Aug 2011 14:33:02 +0200 Subject: [PATCH 09/13] Trigger autogeneration of table files from top level simulat0r Makefile --- simulat0r/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/simulat0r/Makefile b/simulat0r/Makefile index ae22d3d..96a938b 100644 --- a/simulat0r/Makefile +++ b/simulat0r/Makefile @@ -3,6 +3,7 @@ all : tui gui .PHONY : tui gui tui-core clean tui-core : + $(MAKE) -C ../firmware/l0dable usetable.h $(MAKE) -C firmware $(MAKE) -C simcore $(MAKE) -C tui From da3db4e7f82d902a267cbdeb33a0b59e5909d097 Mon Sep 17 00:00:00 2001 From: bernd Date: Thu, 4 Aug 2011 14:44:10 +0200 Subject: [PATCH 10/13] First create autogenerated source file in r0ket, then create bridge files for these --- simulat0r/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/simulat0r/Makefile b/simulat0r/Makefile index 96a938b..7328ea2 100644 --- a/simulat0r/Makefile +++ b/simulat0r/Makefile @@ -4,7 +4,8 @@ all : tui gui tui-core : $(MAKE) -C ../firmware/l0dable usetable.h - $(MAKE) -C firmware + cd ..; $(SHELL) simulat0r/bin/update-bridge-files.sh +$(MAKE) -C firmware $(MAKE) -C simcore $(MAKE) -C tui From 2e390b7d8fb1248b1ed4e25146ddad38758f55c0 Mon Sep 17 00:00:00 2001 From: bernd Date: Thu, 4 Aug 2011 14:47:37 +0200 Subject: [PATCH 11/13] Whoops... messed up tab --- simulat0r/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simulat0r/Makefile b/simulat0r/Makefile index 7328ea2..5a1cf42 100644 --- a/simulat0r/Makefile +++ b/simulat0r/Makefile @@ -5,7 +5,7 @@ all : tui gui 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 tui From 13f544474552ecb3a83e6d98496cc8487e7f6081 Mon Sep 17 00:00:00 2001 From: iggy Date: Thu, 4 Aug 2011 16:29:13 +0200 Subject: [PATCH 12/13] option added for menus to show "JUSTONCE" --- firmware/basic/basic.h | 1 + firmware/basic/menu.c | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/firmware/basic/basic.h b/firmware/basic/basic.h index 0493eaa..008baef 100644 --- a/firmware/basic/basic.h +++ b/firmware/basic/basic.h @@ -180,6 +180,7 @@ struct MENU { }; #define MENU_TIMEOUT (1<<0) +#define MENU_JUSTONCE (1<<1) extern uint8_t menuflags; diff --git a/firmware/basic/menu.c b/firmware/basic/menu.c index 97b0b60..3b9a76a 100644 --- a/firmware/basic/menu.c +++ b/firmware/basic/menu.c @@ -68,6 +68,10 @@ void handleMenu(const struct MENU *the_menu) { case BTN_RIGHT: if (the_menu->entries[menuselection].callback!=NULL) the_menu->entries[menuselection].callback(); + + if (menuflags&MENU_JUSTONCE) + return; + break; case BTN_ENTER: lcdClear(); @@ -77,6 +81,10 @@ void handleMenu(const struct MENU *the_menu) { if (the_menu->entries[menuselection].callback!=NULL) the_menu->entries[menuselection].callback(); lcdRefresh(); + + if (menuflags&MENU_JUSTONCE) + return; + getInputWait(); break; From a5c2ce55a6ac13d7873613194ce198e45535de20 Mon Sep 17 00:00:00 2001 From: iggy Date: Thu, 4 Aug 2011 16:34:56 +0200 Subject: [PATCH 13/13] 1boot alpha --- firmware/l0dable/1boot.c | 53 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 firmware/l0dable/1boot.c diff --git a/firmware/l0dable/1boot.c b/firmware/l0dable/1boot.c new file mode 100644 index 0000000..cf8ce62 --- /dev/null +++ b/firmware/l0dable/1boot.c @@ -0,0 +1,53 @@ +#include + +#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; +} +