MK3EBCmdSample

From EvTechWiki

Jump to: navigation, search

Back to: MK3EBNetworking RequestsAndResponses

Sample

In order to ensure that all of the battery probes sample at the same time (to help make their information make sense, you'd like for them all to be looking at the same instantaneous current if at all possible), there is a command used to store a sample of all the relevant values into a sample buffer where it can be read at leisure.

In the first generation version of the software, this will probably actually be sent by whatever device is attached to the BatMod, as a direct reaction to getting a frame of data from the BatMod. Once the master is coded it will take over this responsability.

In addition, modules with enough left over RAM and codespace to impliment the feature will capture high and low values for all critical inputs during each sample window.

Normally, modules do not reply to a sample command, and it is given as a single byte packet. Literally, the packet would be:

42 | 0\0 | 255 | 65
WakeUp | 1 byte packet, no CRC, no additional addressing | broadcast | sample cmd