kumar singh
/
Dealer_23Feb
Dummy Lora Packet Sending
Fork of Dealer_18feb17 by
Diff: Lora.cpp
- Revision:
- 14:144ed8b74713
- Parent:
- 13:8955f2e95021
- Child:
- 16:7703b9d92326
--- a/Lora.cpp Sun Feb 12 02:57:25 2017 +0000 +++ b/Lora.cpp Sun Feb 12 11:03:44 2017 +0000 @@ -122,12 +122,15 @@ Heart_Beat_Lora_Packet.Car_Ambient_Temperature = 104; //104'F, dummy data for(i=0;i<6;i++) Heart_Beat_Lora_Packet.Parking1_Beacon_ID[i] = (0x01+i); //MAC ID of 1st NearBy Beacon Device with Highest Signal Strength,dummy data + Heart_Beat_Lora_Packet.Parking1_Beacon_Minor = 0x0000; Heart_Beat_Lora_Packet.Parking1_Beacon_Signal_Strength = 23; //Signal Strength of 3rd NearBy Beacon Device with Highest Signal Strength for(i=0;i<6;i++) Heart_Beat_Lora_Packet.Parking2_Beacon_ID[i] = (10+i); //MAC ID of 1st NearBy Beacon Device with Highest Signal Strength,dummy data + Heart_Beat_Lora_Packet.Parking2_Beacon_Minor = 0x0000; Heart_Beat_Lora_Packet.Parking2_Beacon_Signal_Strength = 45; //Signal Strength of 3rd NearBy Beacon Device with Highest Signal Strength for(i=0;i<6;i++) Heart_Beat_Lora_Packet.Parking3_Beacon_ID[i] = (20+i); //MAC ID of 1st NearBy Beacon Device with Highest Signal Strength,dummy data + Heart_Beat_Lora_Packet.Parking3_Beacon_Minor = 0x0000; Heart_Beat_Lora_Packet.Parking3_Beacon_Signal_Strength = 12; //Signal Strength of 3rd NearBy Beacon Device with Highest Signal Strength Heart_Beat_Lora_Packet.FCS = 0x00; //FCS of all packets @@ -148,21 +151,27 @@ Vehicle_Status_Lora_Packet.BLE_Adv_Beacon_ID[i] = BLE_Adv_Module_Beacon_ID[i]; //MAC ID of 1st NearBy Beacon Device with Highest Signal Strength,dummy data for(i=0;i<6;i++) Vehicle_Status_Lora_Packet.Parking1_Beacon_ID[i] = (30+i); //MAC ID of 1st NearBy Beacon Device with Highest Signal Strength,dummy data + Vehicle_Status_Lora_Packet.Parking1_Beacon_Minor = 0x0000; Vehicle_Status_Lora_Packet.Parking1_Beacon_Signal_Strength = 0x07; //Signal Strength of 3rd NearBy Beacon Device with Highest Signal Strength for(i=0;i<6;i++) Vehicle_Status_Lora_Packet.Parking2_Beacon_ID[i] = (40+i); //MAC ID of 1st NearBy Beacon Device with Highest Signal Strength,dummy data + Vehicle_Status_Lora_Packet.Parking2_Beacon_Minor = 0x0000; Vehicle_Status_Lora_Packet.Parking2_Beacon_Signal_Strength = 0x08; //Signal Strength of 3rd NearBy Beacon Device with Highest Signal Strength for(i=0;i<6;i++) Vehicle_Status_Lora_Packet.Parking3_Beacon_ID[i] = (50+i); //MAC ID of 1st NearBy Beacon Device with Highest Signal Strength,dummy data + Vehicle_Status_Lora_Packet.Parking3_Beacon_Minor = 0x0000; Vehicle_Status_Lora_Packet.Parking3_Beacon_Signal_Strength = 0x09; //Signal Strength of 3rd NearBy Beacon Device with Highest Signal Strength for(i=0;i<6;i++) Vehicle_Status_Lora_Packet.Near_Car1_Beacon_ID[i] = (60+i); //MAC ID of 1st NearBy Beacon Device with Highest Signal Strength,dummy data + Vehicle_Status_Lora_Packet.Near_Car1_Beacon_Minor = 0x0000; Vehicle_Status_Lora_Packet.Near_Car1_Beacon_Signal_Strength = 0x09; //Signal Strength of 3rd NearBy Beacon Device with Highest Signal Strength for(i=0;i<6;i++) Vehicle_Status_Lora_Packet.Near_Car2_Beacon_ID[i] = (70+i); //MAC ID of 1st NearBy Beacon Device with Highest Signal Strength,dummy data + Vehicle_Status_Lora_Packet.Near_Car2_Beacon_Minor = 0x0000; Vehicle_Status_Lora_Packet.Near_Car2_Beacon_Signal_Strength = 0x09; //Signal Strength of 3rd NearBy Beacon Device with Highest Signal Strength for(i=0;i<6;i++) Vehicle_Status_Lora_Packet.Near_Car3_Beacon_ID[i] = (80+i); //MAC ID of 1st NearBy Beacon Device with Highest Signal Strength,dummy data + Vehicle_Status_Lora_Packet.Near_Car3_Beacon_Minor = 0x0000; Vehicle_Status_Lora_Packet.Near_Car3_Beacon_Signal_Strength = 0x09; //Signal Strength of 3rd NearBy Beacon Device with Highest Signal Strength Vehicle_Status_Lora_Packet.FCS = 0x00; //FCS of all packets @@ -176,12 +185,15 @@ CheckIN_Lora_Packet.ODO_METER_READING[i] = 0x00; //Dummyy data, To be read using OBD for(i=0;i<6;i++) CheckIN_Lora_Packet.Parking1_Beacon_ID[i] = 0x00; //MAC ID of 1st NearBy Beacon Device with Highest Signal Strength,dummy data + CheckIN_Lora_Packet.Parking1_Beacon_Minor = 0x0000; CheckIN_Lora_Packet.Parking1_Beacon_Signal_Strength = 0x00; //Signal Strength of 3rd NearBy Beacon Device with Highest Signal Strength for(i=0;i<6;i++) CheckIN_Lora_Packet.Parking2_Beacon_ID[i] = 0x00; //MAC ID of 1st NearBy Beacon Device with Highest Signal Strength,dummy data + CheckIN_Lora_Packet.Parking2_Beacon_Minor = 0x0000; CheckIN_Lora_Packet.Parking2_Beacon_Signal_Strength = 0x00; //Signal Strength of 3rd NearBy Beacon Device with Highest Signal Strength for(i=0;i<6;i++) CheckIN_Lora_Packet.Parking3_Beacon_ID[i] = 0x00; //MAC ID of 1st NearBy Beacon Device with Highest Signal Strength,dummy data + CheckIN_Lora_Packet.Parking3_Beacon_Minor = 0x0000; CheckIN_Lora_Packet.Parking3_Beacon_Signal_Strength = 0x00; //Signal Strength of 3rd NearBy Beacon Device with Highest Signal Strength CheckIN_Lora_Packet.FCS = 0x00; //FCS of all packets @@ -191,16 +203,19 @@ Motion_Lora_Packet.Packet_Type = MOTION_PACKET_CMD; for(i=0;i<6;i++) Motion_Lora_Packet.Parking1_Beacon_ID[i] = 0x00; //MAC ID of 1st NearBy Beacon Device with Highest Signal Strength,dummy data + Motion_Lora_Packet.Parking1_Beacon_Minor = 0x0000; Motion_Lora_Packet.Parking1_Beacon_Signal_Strength = 0x00; //Signal Strength of 1st NearBy Beacon Device with Highest Signal Strength for(i=0;i<6;i++) Motion_Lora_Packet.Parking2_Beacon_ID[i] = 0x00; //MAC ID of 2nd NearBy Beacon Device with Highest Signal Strength,dummy data + Motion_Lora_Packet.Parking2_Beacon_Minor = 0x0000; Motion_Lora_Packet.Parking2_Beacon_Signal_Strength = 0x00; //Signal Strength of 2nd NearBy Beacon Device with Highest Signal Strength for(i=0;i<6;i++) Motion_Lora_Packet.Parking3_Beacon_ID[i] = 0x00; //MAC ID of 3rd NearBy Beacon Device with Highest Signal Strength,dummy data + Motion_Lora_Packet.Parking3_Beacon_Minor = 0x0000; Motion_Lora_Packet.Parking3_Beacon_Signal_Strength = 0x00; //Signal Strength of 3rd NearBy Beacon Device with Highest Signal Strength Motion_Lora_Packet.Acceleration_Type = 0x00; //Type of acceleration, Vehicle Started/Vehicle Stopped/Sudden Vehicle Movement Motion_Lora_Packet.FCS = 0x00; //FCS of all packets - + } //HeartBeat Packet should be sent every 30sec @@ -219,12 +234,18 @@ Lora_Packet_To_Send[Pos++] = Heart_Beat_Lora_Packet.Car_Ambient_Temperature; //Get Ambient Temperature for(i=0;i<6;i++) Lora_Packet_To_Send[Pos++] = Heart_Beat_Lora_Packet.Parking1_Beacon_ID[i]; //Get Beacon_ID of 1st nearby Beacon Device + Lora_Packet_To_Send[Pos++] = (Heart_Beat_Lora_Packet.Parking1_Beacon_Minor >> 8); //Get Parking1 Minor + Lora_Packet_To_Send[Pos++] = (Heart_Beat_Lora_Packet.Parking1_Beacon_Minor & 0xFF); //Get Parking1 Minor Lora_Packet_To_Send[Pos++] = Heart_Beat_Lora_Packet.Parking1_Beacon_Signal_Strength; //Get Signal Strength of 1st nearby Beacon Device for(i=0;i<6;i++) Lora_Packet_To_Send[Pos++] = Heart_Beat_Lora_Packet.Parking2_Beacon_ID[i]; //Get Beacon_ID of 2nd nearby Beacon Device + Lora_Packet_To_Send[Pos++] = (Heart_Beat_Lora_Packet.Parking2_Beacon_Minor >> 8); //Get Parking2 Minor + Lora_Packet_To_Send[Pos++] = (Heart_Beat_Lora_Packet.Parking2_Beacon_Minor & 0xFF); //Get Parking2 Minor Lora_Packet_To_Send[Pos++] = Heart_Beat_Lora_Packet.Parking2_Beacon_Signal_Strength; //Get Signal Strength of 2nd nearby Beacon Device for(i=0;i<6;i++) Lora_Packet_To_Send[Pos++] = Heart_Beat_Lora_Packet.Parking3_Beacon_ID[i]; //Get Beacon_ID of 3rd nearby Beacon Device + Lora_Packet_To_Send[Pos++] = (Heart_Beat_Lora_Packet.Parking3_Beacon_Minor >> 8); //Get Parking3 Minor + Lora_Packet_To_Send[Pos++] = (Heart_Beat_Lora_Packet.Parking3_Beacon_Minor & 0xFF); //Get Parking3 Minor Lora_Packet_To_Send[Pos++] = Heart_Beat_Lora_Packet.Parking3_Beacon_Signal_Strength; //Get Signal Strength of 3rd nearby Beacon Device Lora_Packet_To_Send[Pos++] = Calculate_Lora_Frame_FCS(Lora_Packet_To_Send,Pos); //Calculate FCS of all bytes Packet_Type_To_Send = HEARTBEAT_TYPE_PACKET; @@ -255,21 +276,33 @@ Lora_Packet_To_Send[Pos++] = Vehicle_Status_Lora_Packet.BLE_Adv_Beacon_ID[i]; //Get Beacon_ID of 1st nearby Beacon Device for(i=0;i<6;i++) Lora_Packet_To_Send[Pos++] = Vehicle_Status_Lora_Packet.Parking1_Beacon_ID[i]; //Get Beacon_ID of 1st nearby Beacon Device + Lora_Packet_To_Send[Pos++] = (Vehicle_Status_Lora_Packet.Parking1_Beacon_Minor >> 8); //Get Parking1 Minor + Lora_Packet_To_Send[Pos++] = (Vehicle_Status_Lora_Packet.Parking1_Beacon_Minor & 0xFF); //Get Parking1 Minor Lora_Packet_To_Send[Pos++] = Vehicle_Status_Lora_Packet.Parking1_Beacon_Signal_Strength; //Get Signal Strength of 1st nearby Beacon Device for(i=0;i<6;i++) Lora_Packet_To_Send[Pos++] = Vehicle_Status_Lora_Packet.Parking2_Beacon_ID[i]; //Get Beacon_ID of 2nd nearby Beacon Device + Lora_Packet_To_Send[Pos++] = (Vehicle_Status_Lora_Packet.Parking2_Beacon_Minor >> 8); //Get Parking2 Minor + Lora_Packet_To_Send[Pos++] = (Vehicle_Status_Lora_Packet.Parking2_Beacon_Minor & 0xFF); //Get Parking2 Minor Lora_Packet_To_Send[Pos++] = Vehicle_Status_Lora_Packet.Parking2_Beacon_Signal_Strength; //Get Signal Strength of 2nd nearby Beacon Device for(i=0;i<6;i++) Lora_Packet_To_Send[Pos++] = Vehicle_Status_Lora_Packet.Parking3_Beacon_ID[i]; //Get Beacon_ID of 3rd nearby Beacon Device + Lora_Packet_To_Send[Pos++] = (Vehicle_Status_Lora_Packet.Parking3_Beacon_Minor >> 8); //Get Parking3 Minor + Lora_Packet_To_Send[Pos++] = (Vehicle_Status_Lora_Packet.Parking3_Beacon_Minor & 0xFF); //Get Parking3 Minor Lora_Packet_To_Send[Pos++] = Vehicle_Status_Lora_Packet.Parking3_Beacon_Signal_Strength; //Get Signal Strength of 3rd nearby Beacon Device for(i=0;i<6;i++) Lora_Packet_To_Send[Pos++] = Vehicle_Status_Lora_Packet.Near_Car1_Beacon_ID[i]; //Get Beacon_ID of 1st nearby Beacon Device + Lora_Packet_To_Send[Pos++] = (Vehicle_Status_Lora_Packet.Near_Car1_Beacon_Minor >> 8); //Get Near Car1 Minor + Lora_Packet_To_Send[Pos++] = (Vehicle_Status_Lora_Packet.Near_Car1_Beacon_Minor & 0xFF); //Get Near Car1 Minor Lora_Packet_To_Send[Pos++] = Vehicle_Status_Lora_Packet.Near_Car1_Beacon_Signal_Strength; //Get Signal Strength of 1st nearby Beacon Device for(i=0;i<6;i++) Lora_Packet_To_Send[Pos++] = Vehicle_Status_Lora_Packet.Near_Car2_Beacon_ID[i]; //Get Beacon_ID of 2nd nearby Beacon Device + Lora_Packet_To_Send[Pos++] = (Vehicle_Status_Lora_Packet.Near_Car2_Beacon_Minor >> 8); //Get Near Car2 Minor + Lora_Packet_To_Send[Pos++] = (Vehicle_Status_Lora_Packet.Near_Car2_Beacon_Minor & 0xFF); //Get Near Car2 Minor Lora_Packet_To_Send[Pos++] = Vehicle_Status_Lora_Packet.Near_Car2_Beacon_Signal_Strength; //Get Signal Strength of 2nd nearby Beacon Device for(i=0;i<6;i++) Lora_Packet_To_Send[Pos++] = Vehicle_Status_Lora_Packet.Near_Car3_Beacon_ID[i]; //Get Beacon_ID of 3rd nearby Beacon Device + Lora_Packet_To_Send[Pos++] = (Vehicle_Status_Lora_Packet.Near_Car3_Beacon_Minor >> 8); //Get Near Car3 Minor + Lora_Packet_To_Send[Pos++] = (Vehicle_Status_Lora_Packet.Near_Car3_Beacon_Minor & 0xFF); //Get Near Car3 Minor Lora_Packet_To_Send[Pos++] = Vehicle_Status_Lora_Packet.Near_Car3_Beacon_Signal_Strength; //Get Signal Strength of 3rd nearby Beacon Device Lora_Packet_To_Send[Pos++] = Calculate_Lora_Frame_FCS(Lora_Packet_To_Send,Pos); //Calculate FCS of all bytes CheckIN_Packet_Sent_Count++; @@ -296,12 +329,18 @@ Lora_Packet_To_Send[Pos++] = CheckIN_Lora_Packet.Car_Ambient_Temperature; //Get Ambient Temperature for(i=0;i<6;i++) Lora_Packet_To_Send[Pos++] = CheckIN_Lora_Packet.Parking1_Beacon_ID[i]; //Get Beacon_ID of 1st nearby Beacon Device + Lora_Packet_To_Send[Pos++] = (CheckIN_Lora_Packet.Parking1_Beacon_Minor >> 8); //Get Parking1 Minor + Lora_Packet_To_Send[Pos++] = (CheckIN_Lora_Packet.Parking1_Beacon_Minor & 0xFF); //Get Parking1 Minor Lora_Packet_To_Send[Pos++] = CheckIN_Lora_Packet.Parking1_Beacon_Signal_Strength; //Get Signal Strength of 1st nearby Beacon Device for(i=0;i<6;i++) Lora_Packet_To_Send[Pos++] = CheckIN_Lora_Packet.Parking2_Beacon_ID[i]; //Get Beacon_ID of 2nd nearby Beacon Device + Lora_Packet_To_Send[Pos++] = (CheckIN_Lora_Packet.Parking2_Beacon_Minor >> 8); //Get Parking2 Minor + Lora_Packet_To_Send[Pos++] = (CheckIN_Lora_Packet.Parking2_Beacon_Minor & 0xFF); //Get Parking2 Minor Lora_Packet_To_Send[Pos++] = CheckIN_Lora_Packet.Parking2_Beacon_Signal_Strength; //Get Signal Strength of 2nd nearby Beacon Device for(i=0;i<6;i++) Lora_Packet_To_Send[Pos++] = CheckIN_Lora_Packet.Parking3_Beacon_ID[i]; //Get Beacon_ID of 3rd nearby Beacon Device + Lora_Packet_To_Send[Pos++] = (CheckIN_Lora_Packet.Parking3_Beacon_Minor >> 8); //Get Parking3 Minor + Lora_Packet_To_Send[Pos++] = (CheckIN_Lora_Packet.Parking3_Beacon_Minor & 0xFF); //Get Parking3 Minor Lora_Packet_To_Send[Pos++] = CheckIN_Lora_Packet.Parking3_Beacon_Signal_Strength; //Get Signal Strength of 3rd nearby Beacon Device Lora_Packet_To_Send[Pos++] = Calculate_Lora_Frame_FCS(Lora_Packet_To_Send,Pos); //Calculate FCS of all bytes CheckIN_Packet_Sent_Count++; @@ -319,14 +358,50 @@ Lora_Packet_To_Send[Pos++] = (Motion_Lora_Packet.Packet_Type & 0xFF); //LSB of Motion Packet Type for(i=0;i<6;i++) Lora_Packet_To_Send[Pos++] = Motion_Lora_Packet.Parking1_Beacon_ID[i]; //Get Beacon_ID of 1st nearby Beacon Device + Lora_Packet_To_Send[Pos++] = (Motion_Lora_Packet.Parking1_Beacon_Minor >> 8); //Get Parking1 Minor + Lora_Packet_To_Send[Pos++] = (Motion_Lora_Packet.Parking1_Beacon_Minor & 0xFF); //Get Parking1 Minor Lora_Packet_To_Send[Pos++] = Motion_Lora_Packet.Parking1_Beacon_Signal_Strength; //Get Signal Strength of 1st nearby Beacon Device for(i=0;i<6;i++) Lora_Packet_To_Send[Pos++] = Motion_Lora_Packet.Parking2_Beacon_ID[i]; //Get Beacon_ID of 2nd nearby Beacon Device + Lora_Packet_To_Send[Pos++] = (Motion_Lora_Packet.Parking2_Beacon_Minor >> 8); //Get Parking2 Minor + Lora_Packet_To_Send[Pos++] = (Motion_Lora_Packet.Parking2_Beacon_Minor & 0xFF); //Get Parking2 Minor Lora_Packet_To_Send[Pos++] = Motion_Lora_Packet.Parking2_Beacon_Signal_Strength; //Get Signal Strength of 2nd nearby Beacon Device for(i=0;i<6;i++) Lora_Packet_To_Send[Pos++] = Motion_Lora_Packet.Parking3_Beacon_ID[i]; //Get Beacon_ID of 3rd nearby Beacon Device + Lora_Packet_To_Send[Pos++] = (Motion_Lora_Packet.Parking3_Beacon_Minor >> 8); //Get Parking3 Minor + Lora_Packet_To_Send[Pos++] = (Motion_Lora_Packet.Parking3_Beacon_Minor & 0xFF); //Get Parking3 Minor Lora_Packet_To_Send[Pos++] = Motion_Lora_Packet.Parking3_Beacon_Signal_Strength; //Get Signal Strength of 3rd nearby Beacon Device + for(i=0;i<6;i++) + Lora_Packet_To_Send[Pos++] = Motion_Lora_Packet.Near_Car1_Beacon_ID[i]; //Get Beacon_ID of 1st nearby Beacon Device + Lora_Packet_To_Send[Pos++] = (Motion_Lora_Packet.Near_Car1_Beacon_Minor >> 8); //Get Near_Car1 Minor + Lora_Packet_To_Send[Pos++] = (Motion_Lora_Packet.Near_Car1_Beacon_Minor & 0xFF); //Get Near_Car1 Minor + Lora_Packet_To_Send[Pos++] = Motion_Lora_Packet.Near_Car1_Beacon_Signal_Strength; //Get Signal Strength of 1st nearby Beacon Device + for(i=0;i<6;i++) + Lora_Packet_To_Send[Pos++] = Motion_Lora_Packet.Near_Car2_Beacon_ID[i]; //Get Beacon_ID of 2nd nearby Beacon Device + Lora_Packet_To_Send[Pos++] = (Motion_Lora_Packet.Near_Car2_Beacon_Minor >> 8); //Get Near_Car2 Minor + Lora_Packet_To_Send[Pos++] = (Motion_Lora_Packet.Near_Car2_Beacon_Minor & 0xFF); //Get Near_Car2 Minor + Lora_Packet_To_Send[Pos++] = Motion_Lora_Packet.Near_Car2_Beacon_Signal_Strength; //Get Signal Strength of 2nd nearby Beacon Device + for(i=0;i<6;i++) + Lora_Packet_To_Send[Pos++] = Motion_Lora_Packet.Near_Car3_Beacon_ID[i]; //Get Beacon_ID of 3rd nearby Beacon Device + Lora_Packet_To_Send[Pos++] = (Motion_Lora_Packet.Near_Car3_Beacon_Minor >> 8); //Get Near_Car3 Minor + Lora_Packet_To_Send[Pos++] = (Motion_Lora_Packet.Near_Car3_Beacon_Minor & 0xFF); //Get Near_Car3 Minor + Lora_Packet_To_Send[Pos++] = Motion_Lora_Packet.Near_Car3_Beacon_Signal_Strength; //Get Signal Strength of 3rd nearby Beacon Device Lora_Packet_To_Send[Pos++] = Motion_Lora_Packet.Acceleration_Type; //get Type of Acceleration + for(i=0;i<6;i++) + Lora_Packet_To_Send[Pos++] = Motion_Lora_Packet.Near_Car1_Beacon_ID[i]; //Get Beacon_ID of 1st nearby Beacon Device + Lora_Packet_To_Send[Pos++] = (Motion_Lora_Packet.Near_Car1_Beacon_Minor >> 8); //Get Near Car1 Minor + Lora_Packet_To_Send[Pos++] = (Motion_Lora_Packet.Near_Car1_Beacon_Minor & 0xFF); //Get Near Car1 Minor + Lora_Packet_To_Send[Pos++] = Motion_Lora_Packet.Near_Car1_Beacon_Signal_Strength; //Get Signal Strength of 1st nearby Beacon Device + for(i=0;i<6;i++) + Lora_Packet_To_Send[Pos++] = Motion_Lora_Packet.Near_Car2_Beacon_ID[i]; //Get Beacon_ID of 2nd nearby Beacon Device + Lora_Packet_To_Send[Pos++] = (Motion_Lora_Packet.Near_Car2_Beacon_Minor >> 8); //Get Near Car2 Minor + Lora_Packet_To_Send[Pos++] = (Motion_Lora_Packet.Near_Car2_Beacon_Minor & 0xFF); //Get Near Car2 Minor + Lora_Packet_To_Send[Pos++] = Motion_Lora_Packet.Near_Car2_Beacon_Signal_Strength; //Get Signal Strength of 2nd nearby Beacon Device + for(i=0;i<6;i++) + Lora_Packet_To_Send[Pos++] = Motion_Lora_Packet.Near_Car3_Beacon_ID[i]; //Get Beacon_ID of 3rd nearby Beacon Device + Lora_Packet_To_Send[Pos++] = (Motion_Lora_Packet.Near_Car3_Beacon_Minor >> 8); //Get Near Car3 Minor + Lora_Packet_To_Send[Pos++] = (Motion_Lora_Packet.Near_Car3_Beacon_Minor & 0xFF); //Get Near Car3 Minor + Lora_Packet_To_Send[Pos++] = Motion_Lora_Packet.Near_Car3_Beacon_Signal_Strength; //Get Signal Strength of 3rd nearby Beacon Device Lora_Packet_To_Send[Pos++] = Calculate_Lora_Frame_FCS(Lora_Packet_To_Send,Pos); //Calculate FCS of all bytes Motion_Packet_Sent_Count++; Send_Lora_Packet_To_Gateway(Lora_Packet_To_Send,Pos);