From e4afa49685ed50e8d9ed6dfb4486bf7334c57341 Mon Sep 17 00:00:00 2001
From: Jeffrey Phillips Freeman <the@jeffreyfreeman.me>
Date: Fri, 4 Aug 2023 20:06:29 -0400
Subject: [PATCH] Changed text element to be called payload

---
 lib/apex/aprs_kiss.rb | 8 ++++----
 lib/apex/igate_tcp.rb | 4 ++--
 test/tc_aprs_kiss.rb  | 6 +++---
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/lib/apex/aprs_kiss.rb b/lib/apex/aprs_kiss.rb
index a062efa..572126d 100644
--- a/lib/apex/aprs_kiss.rb
+++ b/lib/apex/aprs_kiss.rb
@@ -22,8 +22,8 @@ module Apex
                         # Less than 2 callsigns?
                         if 1.0 < i and i < 11.0
                             if raw_frame[raw_slice + 1] & 0x03 == 0x03 and [0xf0, 0xcf].include? raw_frame[raw_slice + 2]
-                                text_as_array = raw_frame[raw_slice + 3..-1].map { |b| b.chr }
-                                frame[:text] = text_as_array.join
+                                payload_as_array = raw_frame[raw_slice + 3..-1].map { |b| b.chr }
+                                frame[:payload] = payload_as_array.join
                                 frame[:destination] = identity_as_string(extract_callsign(raw_frame))
                                 frame[:source] = identity_as_string(extract_callsign(raw_frame[7..-1]))
                                 frame[:path] = extract_path(i.to_i, raw_frame)
@@ -100,7 +100,7 @@ module Apex
                 enc_frame += encode_callsign(parse_identity_string(path))
             end
 
-            return enc_frame[0...-1] + [enc_frame[-1] | 0x01] + [Kiss::SLOT_TIME] + [0xf0] + frame[:text].chars.map { |c| c.ord }
+            return enc_frame[0...-1] + [enc_frame[-1] | 0x01] + [Kiss::SLOT_TIME] + [0xf0] + frame[:payload].chars.map { |c| c.ord }
         end
 
         private
@@ -170,4 +170,4 @@ module Apex
             end
         end
     end
-end
\ No newline at end of file
+end
diff --git a/lib/apex/igate_tcp.rb b/lib/apex/igate_tcp.rb
index 2466ef0..6b5aa2a 100644
--- a/lib/apex/igate_tcp.rb
+++ b/lib/apex/igate_tcp.rb
@@ -35,7 +35,7 @@ module Apex
                 formatted_frame = [formatted_frame, IGateTcp::format_path(frame[:path])].join(',')
             end
             formatted_frame += ':'
-            formatted_frame += frame[:text]
+            formatted_frame += frame[:payload]
             return formatted_frame
         end
 
@@ -59,7 +59,7 @@ module Apex
             path = path.split(',')
             decoded_frame[:destination] = path.shift
             decoded_frame[:path] = path
-            decoded_frame[:text] = frame_so_far
+            decoded_frame[:payload] = frame_so_far
 
             decoded_frame
         end
diff --git a/test/tc_aprs_kiss.rb b/test/tc_aprs_kiss.rb
index f6aa7a4..c5058c5 100644
--- a/test/tc_aprs_kiss.rb
+++ b/test/tc_aprs_kiss.rb
@@ -7,7 +7,7 @@ module Apex
         :source => 'W2GMD-1',
         :destination => 'OMG',
         :path => ['WIDE1-1', 'WIDE2-2'],
-        :text => 'test_encode_frame'
+        :payload => 'test_encode_frame'
     }
     ENCODED_FRAME_KISS = [192, 0, 158, 154, 142, 64, 64, 64, 96, 174, 100, 142, 154, 136, 64, 98, 174, 146, 136, 138, 98,
                           64, 98, 174, 146, 136, 138, 100, 64, 101, 3, 240, 116, 101, 115, 116, 95, 101, 110, 99, 111, 100,
@@ -17,7 +17,7 @@ module Apex
         :source => 'KG6WTF',
         :destination => 'S7TSUV',
         :path => ['MTOSO-2', 'WIDE2*' 'qAR', 'KF6FIR-10'],
-        :text => '`17El#X-/kg6wtf@gosselinfamily.com'
+        :payload => '`17El#X-/kg6wtf@gosselinfamily.com'
     }
     ENCODED_FRAME_KISS_INVALID = [192, 0, 166, 110, 168, 166, 170, 172, 96, 150, 142, 108, 174, 168, 140, 96, 154, 168, 158,
                                   166, 158, 64, 100, 174, 146, 136, 138, 100, 226, 130, 164, 224, 150, 140, 108, 140, 146, 164,
@@ -81,4 +81,4 @@ module Apex
             assert_equal 0, all_raw_frames.length
         end
     end
-end
\ No newline at end of file
+end
-- 
GitLab