Repo restyled using astyle (#683)
The rules are in .tools/astyle/config/style.cfg and can also be reviewed at https://www.mysensors.org/view/260#coding-guidelines-core-library
This commit is contained in:
@@ -1,54 +1,54 @@
|
||||
/**
|
||||
* The MySensors Arduino library handles the wireless radio link and protocol
|
||||
* between your home built sensors/actuators and HA controller of choice.
|
||||
* The sensors forms a self healing radio network with optional repeaters. Each
|
||||
* repeater and gateway builds a routing tables in EEPROM which keeps track of the
|
||||
* network topology allowing messages to be routed to nodes.
|
||||
*
|
||||
* Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
|
||||
* Copyright (C) 2013-2015 Sensnology AB
|
||||
* Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
|
||||
*
|
||||
* Documentation: http://www.mysensors.org
|
||||
* Support Forum: http://forum.mysensors.org
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
*******************************
|
||||
*
|
||||
* DESCRIPTION
|
||||
* The RS485 Gateway prints data received from sensors on the serial link.
|
||||
* The gateway accepts input on seral which will be sent out on
|
||||
* the RS485 link.
|
||||
*
|
||||
* Wire connections (OPTIONAL):
|
||||
* - Inclusion button should be connected between digital pin 3 and GND
|
||||
* - RX/TX/ERR leds need to be connected between +5V (anode) and digital pin 6/5/4 with resistor 270-330R in a series
|
||||
*
|
||||
* LEDs (OPTIONAL):
|
||||
* - RX (green) - blink fast on radio message recieved. In inclusion mode will blink fast only on presentation recieved
|
||||
* - TX (yellow) - blink fast on radio message transmitted. In inclusion mode will blink slowly
|
||||
* - ERR (red) - fast blink on error during transmission error or recieve crc error
|
||||
*
|
||||
* If your Arduino board has additional serial ports
|
||||
* you can use to connect the RS485 module.
|
||||
* Otherwise, the gateway uses AltSoftSerial to handle two serial
|
||||
* links on one Arduino. Use the following pins for RS485 link
|
||||
*
|
||||
* Board Transmit Receive PWM Unusable
|
||||
* ----- -------- ------- ------------
|
||||
* Teensy 3.0 & 3.1 21 20 22
|
||||
* Teensy 2.0 9 10 (none)
|
||||
* Teensy++ 2.0 25 4 26, 27
|
||||
* Arduino Uno 9 8 10
|
||||
* Arduino Leonardo 5 13 (none)
|
||||
* Arduino Mega 46 48 44, 45
|
||||
* Wiring-S 5 6 4
|
||||
* Sanguino 13 14 12
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* The MySensors Arduino library handles the wireless radio link and protocol
|
||||
* between your home built sensors/actuators and HA controller of choice.
|
||||
* The sensors forms a self healing radio network with optional repeaters. Each
|
||||
* repeater and gateway builds a routing tables in EEPROM which keeps track of the
|
||||
* network topology allowing messages to be routed to nodes.
|
||||
*
|
||||
* Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
|
||||
* Copyright (C) 2013-2015 Sensnology AB
|
||||
* Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
|
||||
*
|
||||
* Documentation: http://www.mysensors.org
|
||||
* Support Forum: http://forum.mysensors.org
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
*******************************
|
||||
*
|
||||
* DESCRIPTION
|
||||
* The RS485 Gateway prints data received from sensors on the serial link.
|
||||
* The gateway accepts input on seral which will be sent out on
|
||||
* the RS485 link.
|
||||
*
|
||||
* Wire connections (OPTIONAL):
|
||||
* - Inclusion button should be connected between digital pin 3 and GND
|
||||
* - RX/TX/ERR leds need to be connected between +5V (anode) and digital pin 6/5/4 with resistor 270-330R in a series
|
||||
*
|
||||
* LEDs (OPTIONAL):
|
||||
* - RX (green) - blink fast on radio message recieved. In inclusion mode will blink fast only on presentation recieved
|
||||
* - TX (yellow) - blink fast on radio message transmitted. In inclusion mode will blink slowly
|
||||
* - ERR (red) - fast blink on error during transmission error or recieve crc error
|
||||
*
|
||||
* If your Arduino board has additional serial ports
|
||||
* you can use to connect the RS485 module.
|
||||
* Otherwise, the gateway uses AltSoftSerial to handle two serial
|
||||
* links on one Arduino. Use the following pins for RS485 link
|
||||
*
|
||||
* Board Transmit Receive PWM Unusable
|
||||
* ----- -------- ------- ------------
|
||||
* Teensy 3.0 & 3.1 21 20 22
|
||||
* Teensy 2.0 9 10 (none)
|
||||
* Teensy++ 2.0 25 4 26, 27
|
||||
* Arduino Uno 9 8 10
|
||||
* Arduino Leonardo 5 13 (none)
|
||||
* Arduino Mega 46 48 44, 45
|
||||
* Wiring-S 5 6 4
|
||||
* Sanguino 13 14 12
|
||||
*
|
||||
*/
|
||||
|
||||
// Enable debug prints to serial monitor
|
||||
#define MY_DEBUG
|
||||
@@ -88,14 +88,17 @@
|
||||
|
||||
#include <MySensors.h>
|
||||
|
||||
void setup() {
|
||||
// Setup locally attached sensors
|
||||
void setup()
|
||||
{
|
||||
// Setup locally attached sensors
|
||||
}
|
||||
|
||||
void presentation() {
|
||||
// Present locally attached sensors
|
||||
void presentation()
|
||||
{
|
||||
// Present locally attached sensors
|
||||
}
|
||||
|
||||
void loop() {
|
||||
// Send locally attached sensor data here
|
||||
void loop()
|
||||
{
|
||||
// Send locally attached sensor data here
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user