-
Notifications
You must be signed in to change notification settings - Fork 2
Sensor can publish dive data to firebase app #24
Comments
format 3: createDive:
append:
dataPoint:
(All multi-byte integers are unsigned and written in little-endian order) |
😮 this might take a second to look through |
@brendanwalters How big should the hash be? |
@brendanwalters Is that the index of the byte or the size of the array? |
All the numbers are intended as array sizes; not sure what hash you mean, but I think everything with format-specific size has been specified . . . |
Example messages: ^ Dive data:
|
A quick go script to generate the above test data (or edit to get other test data): |
Correction: the data will have to be base85 encoded in addition to the above because contrary to some of the documentation / help threads, Particle.publish() does NOT support all char values, failing on at least 0x00 and some high char values. Verified in tests. See |
See project-hermes/hermes-firebase#15
3 topics, 3 functions on sensor for firebase responses:
createDive(char format, int sensorDiveId, float latStart, longStart, latEnd, longEnd, int sampleCount, timestamp epochStart, epochEnd)
readyToReceive(string firebaseDiveId, int sensorDiveId)
diveAppend(char format, int sensorDiveId, timestamp firstDataTime, 41x6byte(depth,temp1,temp2))
diveDone(char format, int sensorDiveId, string firebaseDiveId)
diveComplete(string firebaseDiveId, int sensorDiveId)
-- non-response is "not done"
if Firebase ever errors, log error info under errorId, poke sensor with
stopSending(string firebaseDiveId, int sensorDiveId, string errorId)
The text was updated successfully, but these errors were encountered: