Commit graph

7 commits

Author SHA1 Message Date
7c5dfae57b
Updated formatting with astyle -A14 -S
Signed-off-by: A.M. Rowsell <amrowsell@frozenelectronics.ca>
2019-03-04 12:58:17 -05:00
045e438b6e
Mergine master back into priv to continue work/debugging
Signed-off-by: A.M. Rowsell <amrowsell@frozenelectronics.ca>
2019-01-23 02:53:59 -05:00
049573ad4b
Added documentation, removed library from Makefile
Making the mqtt as a .a library is a project for a later date.
The recipe was broken and so was removed to avoid confusion.

Added the Mozilla License header to the new files. Also a few
small corrections and additions to the Doxygen documentation.

Signed-off-by: A.M. Rowsell <amrowsell@frozenelectronics.ca>
2019-01-22 12:16:39 -05:00
627df20e53
Squashed commit of the following:
commit a4632bb7ad
Author: A.M. Rowsell <amrowsell@frozenelectronics.ca>
Date:   Mon Jan 21 20:13:12 2019 -0500

    Sanitizing key and wifi

    Signed-off-by: A.M. Rowsell <amrowsell@frozenelectronics.ca>

commit 5e3be0f561
Author: A.M. Rowsell <amrowsell@frozenelectronics.ca>
Date:   Mon Jan 21 19:53:42 2019 -0500

    It's alive! New code all working.

    The OneWire library works. It's a bit hacked together, as neither
    the software timer or hardware timer APIs would have worked well,
    because they are implemented terribly by Espressif. The easiest
    way to get around this was to just use system_get_time() and work
    off of that for timing in one-wire comms.

    Split the publish function into two separate functions: one to
    publish floating point numbers, and one to publish integers. In
    a language like Lua or C++ you could have these as one function,
    but in C it's easier to just split them.

    The main.c has a new function called dataLog that deals with
    getting the DS18B20 data and then handing that off to pubfloat().

    I updated the timer names to be more descriptive.

    I grabbed some code to convert integers and floats to strings, as
    I can't be bothered to write that code myself for the millionth
    time.

    If something goes wrong and we are disconnected from our TCP
    connection, all timers are halted so we don't blindly keep
    trying to send packets over a non-existent link.

    Unfortunately the onewire library is hardcoded to use pin 5.
    That will be the next update.

    Signed-off-by: A.M. Rowsell <amrowsell@frozenelectronics.ca>

commit 48702bf328
Author: A.M. Rowsell <amrowsell@frozenelectronics.ca>
Date:   Sun Jan 20 21:13:04 2019 -0500

    First version that compiles with new file layout.

    Had to make many changes to get it to compile across many files,
    including removing the LOCAL specifier from almost all functions.
    Edited the Makefile to compile all three files and link them.
    Haven't tested on hardware yet, that's the next step.

    Lots of small changes to avoid warnings, now that I have turned
    -Wall on. This makes the code a bit "better".

    Signed-off-by: A.M. Rowsell <amrowsell@frozenelectronics.ca>

commit 1cd8191682
Author: A.M. Rowsell <amrowsell@frozenelectronics.ca>
Date:   Sat Jan 19 15:25:44 2019 -0500

    New branch for my new AIO key.

    Will have to remember to sanitize before committing to master.

    Signed-off-by: A.M. Rowsell <amrowsell@frozenelectronics.ca>

Signed-off-by: A.M. Rowsell <amrowsell@frozenelectronics.ca>
2019-01-21 20:14:09 -05:00
5e3be0f561
It's alive! New code all working.
The OneWire library works. It's a bit hacked together, as neither
the software timer or hardware timer APIs would have worked well,
because they are implemented terribly by Espressif. The easiest
way to get around this was to just use system_get_time() and work
off of that for timing in one-wire comms.

Split the publish function into two separate functions: one to
publish floating point numbers, and one to publish integers. In
a language like Lua or C++ you could have these as one function,
but in C it's easier to just split them.

The main.c has a new function called dataLog that deals with
getting the DS18B20 data and then handing that off to pubfloat().

I updated the timer names to be more descriptive.

I grabbed some code to convert integers and floats to strings, as
I can't be bothered to write that code myself for the millionth
time.

If something goes wrong and we are disconnected from our TCP
connection, all timers are halted so we don't blindly keep
trying to send packets over a non-existent link.

Unfortunately the onewire library is hardcoded to use pin 5.
That will be the next update.

Signed-off-by: A.M. Rowsell <amrowsell@frozenelectronics.ca>
2019-01-21 19:53:42 -05:00
48702bf328
First version that compiles with new file layout.
Had to make many changes to get it to compile across many files,
including removing the LOCAL specifier from almost all functions.
Edited the Makefile to compile all three files and link them.
Haven't tested on hardware yet, that's the next step.

Lots of small changes to avoid warnings, now that I have turned
-Wall on. This makes the code a bit "better".

Signed-off-by: A.M. Rowsell <amrowsell@frozenelectronics.ca>
2019-01-20 21:13:04 -05:00
70cf55efdf
Splitting library into own file. Adding onewire.
The mqtt.c file was getting pretty big, so the example code
is now in main.c. Also, we need a onewire library, so I've
started to write on in onewire.c. We will need to make some
changes to the Makefile as well, but I will need to consult
a couple of resources for that.

Signed-off-by: A.M. Rowsell <amrowsell@frozenelectronics.ca>
2019-01-18 23:38:31 -05:00