Commit 8074a13f authored by Nelso Jost's avatar Nelso Jost

FIX: refactoring and documenting

parent 0f97f4dc
This diff is collapsed.
......@@ -109,6 +109,16 @@ todo_include_todos = False
# -- Options for HTML output ----------------------------------------------
# on_rtd is whether we are on readthedocs.org
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
if not on_rtd: # only import and set the theme if we're building docs locally
import sphinx_rtd_theme
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
# otherwise, readthedocs.org uses their theme by default, so no need to specify it
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#html_theme = 'alabaster'
......
......@@ -11,8 +11,20 @@ Contents:
.. toctree::
:maxdepth: 2
DevelopOverview.rst
Let me tell you: this is a test.
Since Pythagoras, we know that :math:`a^2 + b^2 = c^2`.
But now that how it goes:
.. math::
(a + b)^2 = a^2 + 2ab + b^2
(a - b)^2 = a^2 - 2ab + b^2
Indices and tables
==================
......
......@@ -3,12 +3,12 @@
#include "mysensors.h"
#include "utils.h"
String _sensor_names[__SENSOR_COUNT] = __LIST_SENSOR_NAMES;
String _sensor_nicknames[__SENSOR_COUNT] = __LIST_SENSOR_NICKNAMES;
ReadSensorFP _fp_array_read_sensor[__SENSOR_COUNT] = __FP_ARRAY_SENSOR_READ;
String _sensor_names[__SENSOR_COUNT] = __SENSOR_NAMES;
String _sensor_nicknames[__SENSOR_COUNT] = __SENSOR_NICKNAMES;
ReadSensorFP _fp_array_read_sensor[__SENSOR_COUNT] = __FP_ARRAY_READ_SENSOR;
String execute_command(String csv_line)
String execute_board_command(String csv_line)
{
String command = csv_line.substring(0, csv_line.indexOf(CSV_SEP));
String csv_args = csv_line.substring(csv_line.indexOf(CSV_SEP) + 1);
......
......@@ -20,7 +20,7 @@
* Returns a new string with the command output or "<invalid_command:...>"
* if the command name or its arguments are invalid.
*/
String execute_command(String csv_line);
String execute_board_command(String csv_line);
/* Given a CSV string line with sensor names or nicknames, returns a new CSV
......
......@@ -23,6 +23,6 @@ void loop()
if (Serial.available())
{
stream_line = Serial.readString();
Serial.println(execute_command(stream_line));
Serial.println(execute_board_command(stream_line));
}
}
......@@ -22,15 +22,15 @@ void mysensors_setup();
#define __SENSOR_COUNT 5
#define __LIST_SENSOR_NICKNAMES {"l", "p", "t", "ah", "dt"}
#define __SENSOR_NICKNAMES {"l", "p", "t", "ah", "dt"}
#define __LIST_SENSOR_NAMES {"LDR", \
#define __SENSOR_NAMES {"LDR", \
"BMP085_PRESSURE", \
"DHT22_TEMP", \
"DHT22_AH", \
"RTC_DS1307"}
#define __FP_ARRAY_SENSOR_READ {&read_LDR, \
#define __FP_ARRAY_READ_SENSOR {&read_LDR, \
&read_BMP085_PRESSURE, \
&read_DHT22_TEMP, \
&read_DHT22_AH, \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment