bugfix cayenne payload
This commit is contained in:
		
							parent
							
								
									d38151a9e3
								
							
						
					
					
						commit
						b3bade5246
					
				@ -36,7 +36,7 @@
 | 
			
		||||
#define	WIFI_CHANNEL_SWITCH_INTERVAL    50      // [seconds/100] -> 0,5 sec.
 | 
			
		||||
 | 
			
		||||
// LoRa payload default parameters
 | 
			
		||||
#define PAYLOAD_ENCODER                 1       // select payload encoder: 1=Plain, 2=Packed, 3=CayenneLPP
 | 
			
		||||
#define PAYLOAD_ENCODER                 3       // select payload encoder: 1=Plain, 2=Packed, 3=CayenneLPP
 | 
			
		||||
#define SEND_SECS                       120     // payload send cycle [seconds/2] -> 240 sec.
 | 
			
		||||
#define MEM_LOW                         2048    // [Bytes] low memory threshold triggering a send cycle
 | 
			
		||||
#define RETRANSMIT_RCMD                 5       // [seconds] wait time before retransmitting rcommand results
 | 
			
		||||
 | 
			
		||||
@ -183,14 +183,16 @@ void PayloadConvert::writeBitmap(bool a, bool b, bool c, bool d, bool e, bool f,
 | 
			
		||||
#elif PAYLOAD_ENCODER == 3
 | 
			
		||||
 | 
			
		||||
void PayloadConvert::addCount(uint16_t value1, uint16_t value2) {
 | 
			
		||||
  uint16_t val1 = value1 * 100;
 | 
			
		||||
  uint16_t val2 = value2 * 100;
 | 
			
		||||
  buffer[cursor++] = LPP_COUNT_WIFI_CHANNEL;
 | 
			
		||||
  buffer[cursor++] = LPP_ANALOG_INPUT; // workaround, type meter not found?
 | 
			
		||||
  buffer[cursor++] = value1 >> 8;
 | 
			
		||||
  buffer[cursor++] = value1;
 | 
			
		||||
  buffer[cursor++] = val1 >> 8;
 | 
			
		||||
  buffer[cursor++] = val1;
 | 
			
		||||
  buffer[cursor++] = LPP_COUNT_BLE_CHANNEL;
 | 
			
		||||
  buffer[cursor++] = LPP_ANALOG_INPUT; // workaround, type meter not found?
 | 
			
		||||
  buffer[cursor++] = value1 >> 8;
 | 
			
		||||
  buffer[cursor++] = value2;
 | 
			
		||||
  buffer[cursor++] = val2 >> 8;
 | 
			
		||||
  buffer[cursor++] = val2;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#ifdef HAS_GPS
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user