changeset 399:ff60102d5f39 prerelease

Merge
author Giulio Moro <giuliomoro@yahoo.it>
date Wed, 15 Jun 2016 01:34:29 +0100
parents 8a7c35ee8b3f (current diff) 5587d7fa0108 (diff)
children adb4fafbeaef
files Makefile
diffstat 4 files changed, 87 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Tue Jun 14 18:52:10 2016 +0100
+++ b/Makefile	Wed Jun 15 01:34:29 2016 +0100
@@ -50,7 +50,7 @@
 BELA_STARTUP_SCRIPT?=/root/BeagleRT_startup.sh
 BELA_AUDIO_THREAD_NAME?=bela-audio 
 SCREEN_NAME?=Bela
-BELA_IDE_STARTUP_SCRIPT?=/root/BeagleRT_node.sh
+BELA_IDE_STARTUP_SCRIPT?=/root/Bela_node.sh
 BELA_IDE_HOME?=/root/Bela/IDE
 BELA_IDE_SCREEN_NAME?=Bela-IDE
 BELA_IDE_RUN_COMMAND?=cd $(BELA_IDE_HOME) && screen -S $(BELA_IDE_SCREEN_NAME) -d -m node index.js
@@ -251,7 +251,7 @@
 STARTUP_COMMAND=printf "\#!/bin/sh\n\#\n\# This file is autogenerated by Bela. Do not edit!\n\necho Running Bela...\nscreen -S $(SCREEN_NAME) -d -m %s $(RUN_COMMAND) %s\n"
 nostartup: ## No Bela project runs at startup 
 nostartup:
-	@echo "Disabling BeagleRT at startup..."
+	@echo "Disabling Bela at startup..."
 	@printf "#!/bin/sh\n#\n\n# This file is autogenerated by Bela. Do not edit!\n\n# Run on startup disabled -- nothing to do here\n" > $(BELA_STARTUP_SCRIPT)
 
 startuploop: ## Makes PROJECT run at startup and restarts it if it crashes
@@ -278,7 +278,7 @@
 
 BELA_IDE_STARTUP_COMMAND=printf "\#!/bin/sh\n\#\n\# This file is autogenerated by Bela. Do not edit!\n\necho Running the Bela IDE...\n$(BELA_IDE_RUN_COMMAND)\n" > $(BELA_IDE_STARTUP_SCRIPT)
 
-iderunup: ## Enables the IDE at startup
+idestartup: ## Enables the IDE at startup
 	@echo "Enabling the IDE at startup"
 	$(BELA_IDE_STARTUP_COMMAND)
 	@chmod +x $(BELA_IDE_STARTUP_SCRIPT)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/minimal/render.cpp	Wed Jun 15 01:34:29 2016 +0100
@@ -0,0 +1,16 @@
+#include <Bela.h>
+
+bool setup(BelaContext *context, void *userData)
+{
+	return true;
+}
+
+void render(BelaContext *context, void *userData)
+{
+
+}
+
+void cleanup(BelaContext *context, void *userData)
+{
+
+}
\ No newline at end of file
--- a/resources/initd-bela	Tue Jun 14 18:52:10 2016 +0100
+++ b/resources/initd-bela	Wed Jun 15 01:34:29 2016 +0100
@@ -13,11 +13,11 @@
     echo "Adding Bela Audio Cape Overlay..."
     echo BB-BONE-BAREAUDI-02 > /sys/devices/bone_capemgr.9/slots
     cd /root
-    sh BeagleRT_startup.sh
-    sh BeagleRT_node.sh
+    sh Bela_startup.sh
+    sh Bela_node.sh
     ;;
   stop)
-    pkill BeagleRT
+    cd /root/Bela && make stop
     ;;
   *)
     echo "Usage: /etc/init.d/bela {start|stop}"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/resources/initd-bela_shutdown_switch	Wed Jun 15 01:34:29 2016 +0100
@@ -0,0 +1,65 @@
+#!/bin/sh
+# Script to start the GPIO shutdown button checker
+# Adapted from Stephen C Phillips:
+# http://blog.scphillips.com/posts/2013/07/getting-a-python-script-to-run-in-the-background-as-a-service-on-boot/
+
+### BEGIN INIT INFO
+# Provides:          bela_shutdown_swtich
+# Required-Start:    
+# Required-Stop:    
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Monitor the shutdown button on the Bela cape
+# Description:        Monitor the shutdown button on the Bela cape
+### END INIT INFO
+
+# Change the next 3 lines to suit where you install your script and what you want to call it
+DIR=/root
+DAEMON=$DIR/shutdown_switch.sh
+DAEMON_NAME=shutdown_switch
+
+# Add any command line options for your daemon here
+DAEMON_OPTS=""
+
+# This next line determines what user the script runs as.
+# Root generally not recommended but necessary if you are using the Raspberry Pi GPIO from Python.
+DAEMON_USER=root
+
+# The process ID of the script when it runs is stored here:
+PIDFILE=/var/run/$DAEMON_NAME.pid
+
+. /lib/lsb/init-functions
+
+do_start () {
+    log_daemon_msg "Starting system $DAEMON_NAME daemon"
+    start-stop-daemon --start --background --pidfile $PIDFILE --make-pidfile --user $DAEMON_USER --chuid $DAEMON_USER --startas $DAEMON -- $DAEMON_OPTS
+    log_end_msg $?
+}
+do_stop () {
+    log_daemon_msg "Stopping system $DAEMON_NAME daemon"
+    start-stop-daemon --stop --pidfile $PIDFILE --retry 10
+    log_end_msg $?
+}
+
+case "$1" in
+
+    start|stop)
+        do_${1}
+        ;;
+
+    restart|reload|force-reload)
+        do_stop
+        do_start
+        ;;
+
+    status)
+        status_of_proc "$DAEMON_NAME" "$DAEMON" && exit 0 || exit $?
+        ;;
+
+    *)
+        echo "Usage: /etc/init.d/$DAEMON_NAME {start|stop|restart|status}"
+        exit 1
+        ;;
+
+esac
+exit 0
\ No newline at end of file