Update configure script

Add options to set status leds.

Support controller ip address separated by dots.

Fix controller url address option set.
This commit is contained in:
Marcelo Aquino
2016-09-30 17:12:52 -03:00
parent 9f798994fe
commit 0a9351988f
2 changed files with 25 additions and 10 deletions
Vendored
+22 -7
View File
@@ -14,8 +14,8 @@ Help:
Building options:
--soc=[BCM2835|BCM2836|AM33XX|A10|A13|A20|H3]
SoC type to be used. [configure autodetected]
--cpu-flags=<CXXFLAGS> CPU defining/optimizing flags to be used. [configure autodetected]
--extra-cxxflags=<CXXFLAGS> Extra C flags passed to C/C++ compilation. []
--cpu-flags=<CXXFLAGS> CPU defining/optimizing flags to be used. [configure autodetected]
--extra-cxxflags=<CXXFLAGS> Extra C flags passed to C/C++ compilation. []
--extra-ldflags=<LDFLAGS> Extra C flags passed to linking. []
--cxx_compiler=<CXX> C++ compiler [arm-linux-gnueabihf-g++][g++]
--no-clean Don't clean previous build artifacts.
@@ -25,8 +25,7 @@ Installation options:
--gateway-dir=<DIR> Gateway files installation directory. [PREFIX/bin]
MySensors options:
--my-debug=[enable|disable]
Enables or disables MySensors core debugging. [enable]
--my-debug=[enable|disable] Enables or disables MySensors core debugging. [enable]
--my-config-file=<FILE> Config file path. [/etc/mysensors.dat]
--my-gateway=[none|ethernet|serial|mqtt]
Gateway type, set to none to disable gateway feature. [ethernet]
@@ -34,7 +33,6 @@ MySensors options:
Controller or MQTT broker url.
--my-controller-ip-address=<IP>
Controller or MQTT broker ip.
Use commas instead of points. Example: 127,0,0,1
--my-port=<PORT> The port to keep open on gateway mode.
If gateway is set to mqtt, it sets the broker port.
--my-serial-port=<PORT> Serial port. [/dev/ttyACM0]
@@ -56,6 +54,10 @@ MySensors options:
--my-rf24-irq-pin=<PIN> Pin number connected to nRF24L01 IRQ pin.
--my-rx-message-buffer-size=<SIZE>
Buffer size for incoming messages when using rf24 interrupts. [20]
--my-leds-err-pin=<PIN> Error LED pin.
--my-leds-rx-pin=<PIN> Receive LED pin.
--my-leds-tx-pin=<PIN> Transmit LED pin.
--my-leds-blinking-inverse Inverse the blinking feature.
EOF
}
@@ -263,10 +265,11 @@ for opt do
CXXFLAGS="-DMY_RF24_PA_LEVEL=${optarg} $CXXFLAGS"
;;
--my-controller-url-address=*)
CXXFLAGS="-DMY_CONTROLLER_URL_ADDRESS=${optarg} $CXXFLAGS"
CXXFLAGS="-DMY_CONTROLLER_URL_ADDRESS=\\\"${optarg}\\\" $CXXFLAGS"
;;
--my-controller-ip-address=*)
CXXFLAGS="-DMY_CONTROLLER_IP_ADDRESS=${optarg} $CXXFLAGS"
controller_ip=`echo ${optarg//./,}`
CXXFLAGS="-DMY_CONTROLLER_IP_ADDRESS=${controller_ip} $CXXFLAGS"
;;
--my-port=*)
CXXFLAGS="-DMY_PORT=${optarg} $CXXFLAGS"
@@ -286,6 +289,18 @@ for opt do
--my-rx-message-buffer-size=*)
CXXFLAGS="-DMY_RX_MESSAGE_BUFFER_SIZE=${optarg} $CXXFLAGS"
;;
--my-leds-err-pin=*)
CXXFLAGS="-DMY_DEFAULT_ERR_LED_PIN=${optarg} $CXXFLAGS"
;;
--my-leds-rx-pin=*)
CXXFLAGS="-DMY_DEFAULT_RX_LED_PIN=${optarg} $CXXFLAGS"
;;
--my-leds-tx-pin=*)
CXXFLAGS="-DMY_DEFAULT_TX_LED_PIN=${optarg} $CXXFLAGS"
;;
--my-leds-blinking-inverse*)
CXXFLAGS="-DMY_WITH_LEDS_BLINKING_INVERSE $CXXFLAGS"
;;
*)
echo "[WARNING] Unknown option detected:$opt, ignored"
;;
+3 -3
View File
@@ -51,9 +51,9 @@
//#define MY_MQTT_PASSWORD "password"
// Flash leds on rx/tx/err
//#define MY_DEFAULT_ERR_LED_PIN 12 // Error led pin
//#define MY_DEFAULT_RX_LED_PIN 16 // Receive led pin
//#define MY_DEFAULT_TX_LED_PIN 18 // the PCB, on board
//#define MY_DEFAULT_ERR_LED_PIN 12 // Error LED pin
//#define MY_DEFAULT_RX_LED_PIN 16 // Receive LED pin
//#define MY_DEFAULT_TX_LED_PIN 18 // Transmit LED pin
// Inverse the blinking feature
//#define MY_WITH_LEDS_BLINKING_INVERSE