User Tools

Site Tools


packet_api

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
packet_api [2014/01/01 14:26] – [Read header] breaker27packet_api [2014/07/31 11:18] (current) – [Set message data] breaker27
Line 62: Line 62:
 ''msg_tempsensor_temphumbristatus_set_temperature(my_temp);''\\ ''msg_tempsensor_temphumbristatus_set_temperature(my_temp);''\\
 ''msg_tempsensor_temphumbristatus_set_humidity(my_hum);''\\ ''msg_tempsensor_temphumbristatus_set_humidity(my_hum);''\\
-''msg_tempsensor_temphumbristatus_set_brightness(my_hum);''+''msg_tempsensor_temphumbristatus_set_brightness(my_bri);''
  
 These functions are independent on the message type. These functions are independent on the message type.
Line 91: Line 91:
  
 Use the packet length (multiple of 16) you get from the rfm12 function. If it is ok, the packet content can assumed to be valid. Use the packet length (multiple of 16) you get from the rfm12 function. If it is ok, the packet content can assumed to be valid.
 +
 +===== Adjust header offset =====
 +
 +Before accessing packet data, call the function to adjust the (internal) header offset depending on the MessageType. The data can't be decoded correctly otherwise.
 +
 +''pkg_header_adjust_offset();''
 ===== Read header ===== ===== Read header =====
  
packet_api.txt · Last modified: 2014/07/31 11:18 by breaker27