matches/MCTX3420.git
11 years agoSwitch to syslog for logging messages.
Jeremy Tan [Sun, 15 Sep 2013 13:47:32 +0000 (21:47 +0800)]
Switch to syslog for logging messages.

Updated nginx and rsyslog config files are provided to
allow access to the log file from the web server, under
the location /api/log.

This WILL break nginx if you relied on symlinks to the
config file.

11 years agoMinor mods to control code
Jeremy Tan [Sun, 15 Sep 2013 08:05:31 +0000 (16:05 +0800)]
Minor mods to control code

11 years agoUpdated control stuff
Jeremy Tan [Sun, 15 Sep 2013 06:45:35 +0000 (14:45 +0800)]
Updated control stuff

11 years agoAdd semi working control code
Jeremy Tan [Sat, 14 Sep 2013 07:44:33 +0000 (15:44 +0800)]
Add semi working control code

11 years agoChange times to be relative to this experiment
Jeremy Tan [Sat, 14 Sep 2013 06:15:10 +0000 (14:15 +0800)]
Change times to be relative to this experiment

11 years agoPartial implementation of higher level control functions
Jeremy Tan [Sat, 14 Sep 2013 06:03:27 +0000 (14:03 +0800)]
Partial implementation of higher level control functions

11 years agoManual merge of semi-updated control code
Jeremy Tan [Sat, 14 Sep 2013 03:19:49 +0000 (11:19 +0800)]
Manual merge of semi-updated control code

11 years agoMerge branch 'master' of https://github.com/szmoore/MCTX3420.git
Jeremy Tan [Sat, 14 Sep 2013 03:04:12 +0000 (11:04 +0800)]
Merge branch 'master' of https://github.com/szmoore/MCTX3420.git

Conflicts:
server/control.c

11 years agoUse FCGI_INT_T instead of FCGI_LONG_T as appropriate
Jeremy Tan [Sat, 14 Sep 2013 01:54:14 +0000 (09:54 +0800)]
Use FCGI_INT_T instead of FCGI_LONG_T as appropriate

The difference will matter on platforms where sizeof(long) != sizeof(int)

11 years agoAutomatic commit of irc logs
Sam Moore [Fri, 13 Sep 2013 17:00:13 +0000 (01:00 +0800)]
Automatic commit of irc logs

11 years agoMerge branch 'master' of github:szmoore/MCTX3420
Sam Moore [Fri, 13 Sep 2013 13:47:02 +0000 (21:47 +0800)]
Merge branch 'master' of github:szmoore/MCTX3420

Conflicts:
server/data.c
server/sensor.c

It's pretty scary how much got automatically merged.
Almost as if git is sentient.

11 years agoAdd Actuator related code
Sam Moore [Fri, 13 Sep 2013 13:42:00 +0000 (21:42 +0800)]
Add Actuator related code

Made generalised Data_Handler function to reduce copy-paste.
(So you can query an Actuator for what values it has been set to).

Still a lot of copy-paste going on though.

Also added a few reports while I'm at it.

I suspect I will have to merge this with stuff other people did?

11 years agoMerge branch 'master' of https://github.com/szmoore/MCTX3420.git
Jeremy Tan [Fri, 13 Sep 2013 10:25:44 +0000 (18:25 +0800)]
Merge branch 'master' of https://github.com/szmoore/MCTX3420.git

11 years agoMerge pull request #35 from Callum-/master
Callum [Fri, 13 Sep 2013 08:22:05 +0000 (01:22 -0700)]
Merge pull request #35 from Callum-/master

Modified stream to encode image to buffer

11 years agoModified stream to encode image to buffer
Callum [Fri, 13 Sep 2013 08:18:13 +0000 (16:18 +0800)]
Modified stream to encode image to buffer

11 years agoMerge pull request #34 from Callum-/master
Callum [Fri, 13 Sep 2013 07:07:59 +0000 (00:07 -0700)]
Merge pull request #34 from Callum-/master

made threshold structure and fixed checkdata

11 years agomade threshold structure and fixed checkdata
Callum [Fri, 13 Sep 2013 07:03:54 +0000 (15:03 +0800)]
made threshold structure and fixed checkdata

11 years agoMerge branch 'master' of https://github.com/szmoore/MCTX3420.git
Jeremy Tan [Fri, 13 Sep 2013 06:36:57 +0000 (14:36 +0800)]
Merge branch 'master' of https://github.com/szmoore/MCTX3420.git

11 years agoCode cleanup and partial modification to control code
Jeremy Tan [Fri, 13 Sep 2013 06:35:26 +0000 (14:35 +0800)]
Code cleanup and partial modification to control code

11 years agoMerge pull request #31 from Callum-/master
Callum [Fri, 13 Sep 2013 06:19:16 +0000 (23:19 -0700)]
Merge pull request #31 from Callum-/master

included analog and digital fail test sensors

11 years agoModified sanity check
Callum [Fri, 13 Sep 2013 06:14:20 +0000 (14:14 +0800)]
Modified sanity check

11 years agoMerge pull request #33 from jtanx/master
Jeremy Tan [Fri, 13 Sep 2013 05:45:13 +0000 (22:45 -0700)]
Merge pull request #33 from jtanx/master

Some bugfixes for sensor/data code + add FCGI_INT_T

11 years agoMerge remote-tracking branch 'upstream/master'
Callum [Fri, 13 Sep 2013 04:37:04 +0000 (12:37 +0800)]
Merge remote-tracking branch 'upstream/master'

Conflicts:
server/sensor.c
server/sensor.h

11 years agoSome bugfixes for sensor/data code + add FCGI_INT_T
Jeremy Tan [Fri, 13 Sep 2013 03:04:52 +0000 (11:04 +0800)]
Some bugfixes for sensor/data code + add FCGI_INT_T

Note: PrintByTime/Points have exclusive ends now.

11 years agoMerge branch 'master' of github:szmoore/MCTX3420
Sam Moore [Thu, 12 Sep 2013 17:06:29 +0000 (01:06 +0800)]
Merge branch 'master' of github:szmoore/MCTX3420

Stupid irc logs

11 years agoFix errors in refactored code
Sam Moore [Thu, 12 Sep 2013 17:04:48 +0000 (01:04 +0800)]
Fix errors in refactored code

NOTE to Jeremy: I was using 2 FILE* for read/writing
But that seems to cause irregular behaviour (fread fails a lot).
So I just made both the FILE* the same and put mutexes around all of Data_Save and Data_Read for now.

11 years agoAutomatic commit of irc logs
Sam Moore [Thu, 12 Sep 2013 17:00:09 +0000 (01:00 +0800)]
Automatic commit of irc logs

11 years agoMerge branch 'refactor'
Sam Moore [Thu, 12 Sep 2013 15:50:44 +0000 (23:50 +0800)]
Merge branch 'refactor'

Conflicts:
server/sensor.c
server/sensor.h

Also made the resulting code compile.

BUT...
There are memory errors in the FCGI code :S

11 years agoRefactor Sensor related code; introduce seperate functions for dealing with DataPoints
Sam Moore [Thu, 12 Sep 2013 15:39:23 +0000 (23:39 +0800)]
Refactor Sensor related code; introduce seperate functions for dealing with DataPoints

DataFile acts as wrapper around whatever stores DataPoints. Currently wraps a binary file.
Rewrote Sensor_Handler in anticipation of using new FCGI_ParseRequest function.

Hopefully I can merge this easily :S

11 years agoMerge pull request #32 from jtanx/master
Sam Moore [Thu, 12 Sep 2013 14:18:12 +0000 (07:18 -0700)]
Merge pull request #32 from jtanx/master

Add FCGI request parsing helper

11 years agoRevert change made to timestamp placing in JSON responses
Jeremy Tan [Thu, 12 Sep 2013 14:14:08 +0000 (22:14 +0800)]
Revert change made to timestamp placing in JSON responses

11 years agoAdd request parsing helper, add TIMEVAL_* macros, move timestamps to identify module
Jeremy Tan [Thu, 12 Sep 2013 14:06:26 +0000 (22:06 +0800)]
Add request parsing helper, add TIMEVAL_* macros, move timestamps to identify module

11 years agoincluded analog and digital fail test sensors
Callum [Thu, 12 Sep 2013 13:26:53 +0000 (21:26 +0800)]
included analog and digital fail test sensors

11 years agoGet rid of OpenCV for now
Sam Moore [Thu, 12 Sep 2013 05:16:47 +0000 (13:16 +0800)]
Get rid of OpenCV for now

(Won't fit on BBB SD card)

11 years agoAutomatic commit of irc logs
Sam Moore [Wed, 11 Sep 2013 17:00:07 +0000 (01:00 +0800)]
Automatic commit of irc logs

11 years agoAutomatic commit of irc logs
Sam Moore [Tue, 10 Sep 2013 17:00:07 +0000 (01:00 +0800)]
Automatic commit of irc logs

11 years agoAutomatic commit of irc logs
Sam Moore [Mon, 9 Sep 2013 17:00:07 +0000 (01:00 +0800)]
Automatic commit of irc logs

11 years agoMerge branch 'master' of https://github.com/szmoore/MCTX3420.git
Jeremy Tan [Mon, 9 Sep 2013 06:32:39 +0000 (14:32 +0800)]
Merge branch 'master' of https://github.com/szmoore/MCTX3420.git

Conflicts:
server/sensor.c

11 years agoAdd relative times, allow "points" param to work with "start_time"
Sam Moore [Mon, 9 Sep 2013 04:45:45 +0000 (12:45 +0800)]
Add relative times, allow "points" param to work with "start_time"

Eg: To get a single point at a given time: http://localhost/api/sensors?id=0&start_time=5&points=1

The binary search means it will either get the closest point before or after the specified time.

Should probably make it so that FindTime will always get the same index given the same input.
Otherwise problems might arise.

Need some more argument checking?

11 years agoImprove Server API for transferring sensor data
Sam Moore [Mon, 9 Sep 2013 03:22:55 +0000 (11:22 +0800)]
Improve Server API for transferring sensor data

- Specify format as JSON, TSV or CSV: http://localhost/api/sensors?id=0&format=tsv
  - Default is JSON
  - Currently lower case; make case insensitive?

- Specify number of points (most recent) to transfer: http://localhost/api/sensors?id=0&points=all
  - Default is SENSOR_QUERYBUFSIZ (10)
  - "all" - Will transfer *all* points
  - Currently incompatable with the time seeking options (TODO: Make compatable?)

- Specify time range to return data points: http://localhost/api/sensors?id=0&start_time=5&end_time=6
  - Default behaviour is to just return most recent X points; see above
  - Currently no options for relative (eg: last 5s) time arguments (TODO: Include relative times?)\

Consider:
  - Remove critical sections by using one FILE* for writing and one for reading
    - A critical section is needed around every call to fseek, because the writing thread may write suddenly to the wrong position
    - Will having 2 FILE* mean file can be written and read independently?
      - Need to be sure that this is actually thread safe, otherwise it is more work for no reward
  - Need to simplify Sensor_Handler
    - Added some helper functions, but probably need more
  - Need to do some testing of this API in a test GUI

11 years agoMerge pull request #30 from Callum-/master
Sam Moore [Mon, 9 Sep 2013 01:34:41 +0000 (18:34 -0700)]
Merge pull request #30 from Callum-/master

safety check

11 years agoMerge pull request #28 from justinjessada/master
Sam Moore [Mon, 9 Sep 2013 01:34:02 +0000 (18:34 -0700)]
Merge pull request #28 from justinjessada/master

Added sensors, actuators, PWM code

11 years agoAutomatic commit of irc logs
Sam Moore [Sun, 8 Sep 2013 17:00:07 +0000 (01:00 +0800)]
Automatic commit of irc logs

11 years agoSimple safety check
Callum [Sun, 8 Sep 2013 11:45:06 +0000 (19:45 +0800)]
Simple safety check

11 years agoAdded safety check mechanism (needs some work)
Callum [Sun, 8 Sep 2013 11:43:41 +0000 (19:43 +0800)]
Added safety check mechanism (needs some work)

11 years agoMerge pull request #29 from Callum-/master
Callum [Sun, 8 Sep 2013 09:38:50 +0000 (02:38 -0700)]
Merge pull request #29 from Callum-/master

fixed memory leaks

11 years agoFixed memory leaks
Callum [Sun, 8 Sep 2013 09:36:43 +0000 (17:36 +0800)]
Fixed memory leaks

11 years agoFixed memory leaks
Callum [Sun, 8 Sep 2013 09:33:53 +0000 (17:33 +0800)]
Fixed memory leaks

11 years agoAutomatic commit of irc logs
Sam Moore [Sat, 7 Sep 2013 17:00:07 +0000 (01:00 +0800)]
Automatic commit of irc logs

11 years agoAdd experimental support for querying a sensor an arbitrary range of points
Jeremy Tan [Sat, 7 Sep 2013 13:52:29 +0000 (21:52 +0800)]
Add experimental support for querying a sensor an arbitrary range of points

11 years agoAdd sensors, actuators, PWM code
Justin Kruger [Sat, 7 Sep 2013 12:03:57 +0000 (20:03 +0800)]
Add sensors, actuators, PWM code

Kept in separate files currently, can test and write proper function
once Beaglebone arrives

11 years agoAutomatic commit of irc logs
Sam Moore [Fri, 6 Sep 2013 17:00:08 +0000 (01:00 +0800)]
Automatic commit of irc logs

11 years agoUpdate unit tests
Jeremy Tan [Fri, 6 Sep 2013 12:54:45 +0000 (20:54 +0800)]
Update unit tests

11 years agoMerge pull request #27 from jtanx/master
Jeremy Tan [Fri, 6 Sep 2013 12:09:55 +0000 (05:09 -0700)]
Merge pull request #27 from jtanx/master

Add further identification methods + some bugfixes

11 years agoRevert change to dump loop condition
Jeremy Tan [Fri, 6 Sep 2013 12:01:02 +0000 (20:01 +0800)]
Revert change to dump loop condition

11 years agoAdd API version and change FCGI_RejectJSON
Jeremy Tan [Fri, 6 Sep 2013 11:40:47 +0000 (19:40 +0800)]
Add API version and change FCGI_RejectJSON

FCGI_RejectJSON now requires a description message.

11 years agoFix g_sensor_names (enum out of order) and add identification
Jeremy Tan [Fri, 6 Sep 2013 03:02:40 +0000 (11:02 +0800)]
Fix g_sensor_names (enum out of order) and add identification

11 years agoAutomatic commit of irc logs
Sam Moore [Thu, 5 Sep 2013 17:00:08 +0000 (01:00 +0800)]
Automatic commit of irc logs

11 years agoMerge pull request #26 from jtanx/master
Jeremy Tan [Thu, 5 Sep 2013 13:25:13 +0000 (06:25 -0700)]
Merge pull request #26 from jtanx/master

Fix segfault  & sensors bounds check + some documentation refactoring + work on unit tests

11 years agoNicer version...
Jeremy Tan [Thu, 5 Sep 2013 13:21:46 +0000 (21:21 +0800)]
Nicer version...

11 years agoMerge branch 'master' of https://github.com/szmoore/MCTX3420.git
Jeremy Tan [Thu, 5 Sep 2013 13:18:38 +0000 (21:18 +0800)]
Merge branch 'master' of https://github.com/szmoore/MCTX3420.git

11 years agoChange @purpose to @brief (Doxygen warning) and work on unit tests
Jeremy Tan [Thu, 5 Sep 2013 13:18:32 +0000 (21:18 +0800)]
Change @purpose to @brief (Doxygen warning) and work on unit tests

11 years agoAutomatic commit of irc logs
Sam Moore [Wed, 4 Sep 2013 17:00:06 +0000 (01:00 +0800)]
Automatic commit of irc logs

11 years agoMerge branch 'master' of https://github.com/szmoore/MCTX3420.git
Jeremy Tan [Wed, 4 Sep 2013 12:05:08 +0000 (20:05 +0800)]
Merge branch 'master' of https://github.com/szmoore/MCTX3420.git

11 years agoFix segfault and bounds checking on sensor queries
Jeremy Tan [Wed, 4 Sep 2013 12:04:41 +0000 (20:04 +0800)]
Fix segfault and bounds checking on sensor queries

11 years agoAutomatic commit of irc logs
Sam Moore [Tue, 3 Sep 2013 17:00:08 +0000 (01:00 +0800)]
Automatic commit of irc logs

11 years agoAutomatic commit of irc logs
Sam Moore [Mon, 2 Sep 2013 17:00:06 +0000 (01:00 +0800)]
Automatic commit of irc logs

11 years agoAdd control to GUI
Sam Moore [Mon, 2 Sep 2013 11:51:40 +0000 (19:51 +0800)]
Add control to GUI

11 years agoMerge branch 'master' of https://github.com/szmoore/MCTX3420.git
Jeremy Tan [Mon, 2 Sep 2013 05:18:21 +0000 (13:18 +0800)]
Merge branch 'master' of https://github.com/szmoore/MCTX3420.git

11 years agoAdd log message for any rejected requests
Jeremy Tan [Mon, 2 Sep 2013 05:17:56 +0000 (13:17 +0800)]
Add log message for any rejected requests

11 years agoMerge pull request #25 from jtanx/master
Jeremy Tan [Mon, 2 Sep 2013 03:24:27 +0000 (20:24 -0700)]
Merge pull request #25 from jtanx/master

Update makefile

11 years agoCreate web directory to put web stuff in
Sam Moore [Mon, 2 Sep 2013 11:15:16 +0000 (19:15 +0800)]
Create web directory to put web stuff in

11 years agoMerge branch 'master' of https://github.com/szmoore/MCTX3420.git
Jeremy Tan [Mon, 2 Sep 2013 03:22:52 +0000 (11:22 +0800)]
Merge branch 'master' of https://github.com/szmoore/MCTX3420.git

11 years agoFix makefile
Jeremy Tan [Mon, 2 Sep 2013 03:22:34 +0000 (11:22 +0800)]
Fix makefile

11 years agoMerge pull request #24 from jtanx/master
Jeremy Tan [Mon, 2 Sep 2013 02:54:02 +0000 (19:54 -0700)]
Merge pull request #24 from jtanx/master

Add actuators code

11 years agoFix linkage issues
Jeremy Tan [Mon, 2 Sep 2013 00:58:04 +0000 (08:58 +0800)]
Fix linkage issues

11 years agoMerge branch 'master' of https://github.com/szmoore/MCTX3420.git
Jeremy Tan [Mon, 2 Sep 2013 00:45:52 +0000 (08:45 +0800)]
Merge branch 'master' of https://github.com/szmoore/MCTX3420.git

11 years agoUpdate unit tests.
Jeremy Tan [Mon, 2 Sep 2013 00:45:28 +0000 (08:45 +0800)]
Update unit tests.
Todo: Fix unit tests for access control

11 years agoAutomatic commit of irc logs
Sam Moore [Sun, 1 Sep 2013 17:00:06 +0000 (01:00 +0800)]
Automatic commit of irc logs

11 years agoAdd basic jQuery & flot GUI
Sam Moore [Mon, 2 Sep 2013 00:27:15 +0000 (08:27 +0800)]
Add basic jQuery & flot GUI

Needs a lot of work, but at least it exists.

11 years agoMerge pull request #23 from Callum-/master
Sam Moore [Sun, 1 Sep 2013 16:01:32 +0000 (09:01 -0700)]
Merge pull request #23 from Callum-/master

stream

11 years agoMerge remote-tracking branch 'upstream/master'
Callum [Sun, 1 Sep 2013 09:55:55 +0000 (17:55 +0800)]
Merge remote-tracking branch 'upstream/master'

11 years agoSimple streaming functionality
Callum [Sun, 1 Sep 2013 09:53:40 +0000 (17:53 +0800)]
Simple streaming functionality

11 years agoAutomatic commit of irc logs
Sam Moore [Sat, 31 Aug 2013 17:00:06 +0000 (01:00 +0800)]
Automatic commit of irc logs

11 years agoAutomatic commit of irc logs
Sam Moore [Fri, 30 Aug 2013 17:00:07 +0000 (01:00 +0800)]
Automatic commit of irc logs

11 years agoChange FCGI_Authorize* to FCGI_*Control. Add actuator test code.
Jeremy Tan [Fri, 30 Aug 2013 10:20:35 +0000 (18:20 +0800)]
Change FCGI_Authorize* to FCGI_*Control. Add actuator test code.

11 years agoMerge branch 'master' of https://github.com/szmoore/MCTX3420.git
Jeremy Tan [Fri, 30 Aug 2013 10:18:30 +0000 (18:18 +0800)]
Merge branch 'master' of https://github.com/szmoore/MCTX3420.git

11 years agoAutomatic commit of irc logs
Sam Moore [Thu, 29 Aug 2013 17:00:10 +0000 (01:00 +0800)]
Automatic commit of irc logs

11 years ago(Restructure) Move controls to separate file.
Jeremy Tan [Thu, 29 Aug 2013 08:13:30 +0000 (16:13 +0800)]
(Restructure) Move controls to separate file.
This should be where actuators stuff goes.

11 years agoMerge branch 'master' of https://github.com/szmoore/MCTX3420.git
Jeremy Tan [Thu, 29 Aug 2013 01:35:29 +0000 (09:35 +0800)]
Merge branch 'master' of https://github.com/szmoore/MCTX3420.git

Conflicts:
irc/log

11 years agoMerge branch 'master' of https://github.com/jtanx/MCTX3420.git
Jeremy Tan [Thu, 29 Aug 2013 01:34:59 +0000 (09:34 +0800)]
Merge branch 'master' of https://github.com/jtanx/MCTX3420.git

Conflicts:
testing/qunit/unit-tests.js

11 years agoSwitch back to HTTP status codes for fastcgi + update unit tests
Jeremy Tan [Thu, 29 Aug 2013 01:32:35 +0000 (09:32 +0800)]
Switch back to HTTP status codes for fastcgi + update unit tests

11 years agoSwitch back to HTTP status codes for fastcgi + update unit tests
Jeremy Tan [Thu, 29 Aug 2013 01:28:44 +0000 (09:28 +0800)]
Switch back to HTTP status codes for fastcgi + update unit tests

11 years agoAutomatic commit of irc logs
Sam Moore [Wed, 28 Aug 2013 17:00:05 +0000 (01:00 +0800)]
Automatic commit of irc logs

11 years agoAutomatic commit of irc logs
Sam Moore [Tue, 27 Aug 2013 17:00:10 +0000 (01:00 +0800)]
Automatic commit of irc logs

11 years agoBegin unit tests
Jeremy Tan [Wed, 28 Aug 2013 09:35:02 +0000 (17:35 +0800)]
Begin unit tests

11 years agoAutomatic commit of irc logs
Sam Moore [Tue, 27 Aug 2013 17:00:10 +0000 (01:00 +0800)]
Automatic commit of irc logs

11 years agoMerge branch 'master' of https://github.com/szmoore/MCTX3420.git
Jeremy Tan [Tue, 27 Aug 2013 13:04:43 +0000 (21:04 +0800)]
Merge branch 'master' of https://github.com/szmoore/MCTX3420.git

11 years agoAdd extern for JSONBool to header
Jeremy Tan [Tue, 27 Aug 2013 13:03:30 +0000 (21:03 +0800)]
Add extern for JSONBool to header

11 years agoMerge pull request #21 from jtanx/master
Jeremy Tan [Tue, 27 Aug 2013 13:01:42 +0000 (06:01 -0700)]
Merge pull request #21 from jtanx/master

Add JSON bool function

UCC git Repository :: git.ucc.asn.au