Some spacing, added header length minimum.
This commit is contained in:
		
							parent
							
								
									9b2987de08
								
							
						
					
					
						commit
						55c10c503b
					
				
							
								
								
									
										7
									
								
								AFSK.h
								
								
								
								
							
							
						
						
									
										7
									
								
								AFSK.h
								
								
								
								
							| 
						 | 
					@ -17,6 +17,7 @@
 | 
				
			||||||
// This is with all the digis, two addresses, framing and full payload
 | 
					// This is with all the digis, two addresses, framing and full payload
 | 
				
			||||||
// Two more bytes are added for HDLC_ESCAPEs
 | 
					// Two more bytes are added for HDLC_ESCAPEs
 | 
				
			||||||
#define PACKET_MAX_LEN 512
 | 
					#define PACKET_MAX_LEN 512
 | 
				
			||||||
 | 
					#define AX25_PACKET_HEADER_MINLEN 22
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// HDLC framing bits
 | 
					// HDLC framing bits
 | 
				
			||||||
#define HDLC_FRAME    0x7E
 | 
					#define HDLC_FRAME    0x7E
 | 
				
			||||||
| 
						 | 
					@ -48,7 +49,7 @@ public:
 | 
				
			||||||
    void init(unsigned short dlen);
 | 
					    void init(unsigned short dlen);
 | 
				
			||||||
    inline void free() {
 | 
					    inline void free() {
 | 
				
			||||||
      if(freeData)
 | 
					      if(freeData)
 | 
				
			||||||
      ::free(dataPtr);
 | 
					        ::free(dataPtr);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    inline const unsigned char getByte(void) {
 | 
					    inline const unsigned char getByte(void) {
 | 
				
			||||||
      return *readPos++;
 | 
					      return *readPos++;
 | 
				
			||||||
| 
						 | 
					@ -232,7 +233,7 @@ public:
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  inline bool txReady() volatile {
 | 
					  inline bool txReady() volatile {
 | 
				
			||||||
    if(encoder.isDone() && encoder.hasPackets())
 | 
					    if(encoder.isDone() && encoder.hasPackets())
 | 
				
			||||||
    return true;
 | 
					      return true;
 | 
				
			||||||
    return false;
 | 
					    return false;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  inline bool isDone() volatile { return encoder.isDone(); }
 | 
					  inline bool isDone() volatile { return encoder.isDone(); }
 | 
				
			||||||
| 
						 | 
					@ -246,7 +247,7 @@ public:
 | 
				
			||||||
  inline bool putTXPacket(Packet *packet) {
 | 
					  inline bool putTXPacket(Packet *packet) {
 | 
				
			||||||
    bool ret = encoder.putPacket(packet);
 | 
					    bool ret = encoder.putPacket(packet);
 | 
				
			||||||
    if(!ret) // No room?
 | 
					    if(!ret) // No room?
 | 
				
			||||||
    PacketBuffer::freePacket(packet);
 | 
					      PacketBuffer::freePacket(packet);
 | 
				
			||||||
    return ret;
 | 
					    return ret;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  inline Packet *getRXPacket() {
 | 
					  inline Packet *getRXPacket() {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue