Skip to content

Commit

Permalink
Merge pull request #18 from floripasat/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
mgm8 authored Jun 8, 2019
2 parents 3289a0b + 25cc9d4 commit defb4ee
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 34 deletions.
2 changes: 1 addition & 1 deletion gui/fsat_grs_gui.glade
Original file line number Diff line number Diff line change
Expand Up @@ -7946,7 +7946,7 @@ Gabriel Mariano Marcelino &lt;[email protected]&gt;</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Duration [hours]:</property>
<property name="label" translatable="yes">Duration [minutes]:</property>
</object>
<packing>
<property name="left_attach">0</property>
Expand Down
4 changes: 2 additions & 2 deletions src/beacon_data_old.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*
* \author Gabriel Mariano Marcelino <[email protected]>
*
* \version 0.4.8
* \version 0.5.14
*
* \date 12/09/2017
*
Expand Down Expand Up @@ -376,7 +376,7 @@ string BeaconDataOld::Log()

const char* BeaconDataOld::getLabel()
{
return "BEACON";
return "Beacon";
}

void BeaconDataOld::ForceDisplay(vector<string> data)
Expand Down
6 changes: 3 additions & 3 deletions src/fsat-grs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*
* \author Gabriel Mariano Marcelino <[email protected]>
*
* \version 0.5.13
* \version 0.5.15
*
* \date 10/09/2017
*
Expand Down Expand Up @@ -2436,7 +2436,7 @@ void FSatGRS::OnButtonDataRequestCancelClicked()

void FSatGRS::OnButtonBroadcastDialogSendClicked()
{
if (entry_dialog_broadcast_message->get_text().size() <= 20)
if (entry_dialog_broadcast_message->get_text().size() <= 38)
{
string message_broadcast_event = "Transmitting ";
message_broadcast_event += entry_config_uplink_burst->get_text();
Expand All @@ -2452,7 +2452,7 @@ void FSatGRS::OnButtonBroadcastDialogSendClicked()
}
else
{
this->RaiseErrorMessage("The message is too large!", "The message to broadcast must be lesser or equal to 20 characters.");
this->RaiseErrorMessage("The message is too large!", "The message to broadcast must be lesser or equal to 38 characters.");
}
}

Expand Down
45 changes: 21 additions & 24 deletions src/ngham_pkts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*
* \author Gabriel Mariano Marcelino <[email protected]>
*
* \version 0.5.11
* \version 0.5.14
*
* \date 06/10/2017
*
Expand Down Expand Up @@ -122,30 +122,30 @@ bool NGHamPkts::ProcessByte(uint8_t byte)
switch(data[0])
{
case FLORIPASAT_PACKET_BEACON_NGHAM_OBDH_DATA:
event_text = "New valid BEACON packet from ";
event_text = "Beacon: New OBDH packet from ";
event_text += substr_to_callsign(src_callsign);
event_text += " containing OBDH data!";
event_text += "!";

packet_data->Update(data, data_len);

break;
case FLORIPASAT_PACKET_BEACON_NGHAM_EPS_DATA:
event_text = "New valid BEACON packet from ";
event_text = "Beacon: New EPS packet from ";
event_text += substr_to_callsign(src_callsign);
event_text += " containing EPS data!";
event_text += "!";

packet_data->Update(data, data_len);

break;
case FLORIPASAT_PACKET_BEACON_NGHAM_TTC_DATA:
event_text = "New valid BEACON packet from ";
event_text = "Beacon: New TTC packet from ";
event_text += substr_to_callsign(src_callsign);
event_text += " containing TTC data!";
event_text += "!";
break;
case FLORIPASAT_PACKET_DOWNLINK_TELEMETRY:
event_text = "New valid DOWNLINK packet from ";
event_text = "Downlink: New telemetry packet from ";
event_text += substr_to_callsign(src_callsign);
event_text += " containing TELEMETRY data!";
event_text += "!";

packet_data->Update(data, data_len);

Expand All @@ -156,7 +156,7 @@ bool NGHamPkts::ProcessByte(uint8_t byte)
dst_callsign += data[i];
}

event_text = "Ping answer to ";
event_text = "Downlink: Ping to ";
event_text += substr_to_callsign(dst_callsign);
event_text += " received from ";
event_text += substr_to_callsign(src_callsign);
Expand All @@ -170,9 +170,11 @@ bool NGHamPkts::ProcessByte(uint8_t byte)
dst_callsign += data[i];
}

event_text = "Data requested by ";
event_text = "Downlink: Data requested by ";
event_text += substr_to_callsign(dst_callsign);
event_text += " received!";
event_text += " received from ";
event_text += substr_to_callsign(src_callsign);
event_text += "!";

packet_data->Update(data, data_len);

Expand All @@ -184,10 +186,9 @@ bool NGHamPkts::ProcessByte(uint8_t byte)
dst_callsign += data[i];
}

event_text = "Enabling hibernation mode for ";
event_text = "Downlink: Hibernation mode enabled by ";
event_text += to_string(int((data[15] << 8) | data[16]));
event_text += " hours!";
event_text += " (requested by ";
event_text += " minutes! (requested by ";
event_text += substr_to_callsign(dst_callsign);
event_text += ")";

Expand All @@ -199,7 +200,7 @@ bool NGHamPkts::ProcessByte(uint8_t byte)
dst_callsign += data[i];
}

event_text = "Charge reset executed! (requested by ";
event_text = "Downlink: Charge reset executed! (requested by ";
event_text += substr_to_callsign(dst_callsign);
event_text += ")";

Expand All @@ -211,7 +212,7 @@ bool NGHamPkts::ProcessByte(uint8_t byte)
dst_callsign += data[i];
}

event_text = "Message from ";
event_text = "Downlink: Message from ";
event_text += substr_to_callsign(dst_callsign);
event_text += " to ";

Expand All @@ -232,7 +233,7 @@ bool NGHamPkts::ProcessByte(uint8_t byte)

break;
case FLORIPASAT_PACKET_DOWNLINK_PAYLOAD_X_STATUS:
event_text = "Payload X status ";
event_text = "Downlink: Payload X status ";
event_text += to_string(int((data[8] << 8) | data[9]));
event_text += ": ";

Expand All @@ -253,7 +254,7 @@ bool NGHamPkts::ProcessByte(uint8_t byte)
dst_callsign += data[i];
}

event_text = "RUSH status received (requested by ";
event_text = "Downlink: RUSH status received (requested by ";
event_text += substr_to_callsign(dst_callsign);
event_text += "): ";
event_text += data[15] == 0 ? "DISABLED" : "ENABLED";
Expand Down Expand Up @@ -300,13 +301,10 @@ bool NGHamPkts::ProcessByte(uint8_t byte)
receive_pkt = false;

return true;

break;
case PKT_CONDITION_PREFAIL:
return false;
break;
case PKT_CONDITION_FAIL:
event_text = "New invalid NGHAM packet from " + string(packet_data->getLabel());
event_text = string(packet_data->getLabel()) + ": New invalid NGHam packet!";

event_log->AddNewEvent(event_text.c_str(), EVENT_LOG_TYPE_NEW_INVALID_PACKET);

Expand All @@ -320,7 +318,6 @@ bool NGHamPkts::ProcessByte(uint8_t byte)
receive_pkt = false;

return true;
break;
}

return false;
Expand Down
4 changes: 2 additions & 2 deletions src/telemetry_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*
* \author Gabriel Mariano Marcelino <[email protected]>
*
* \version 0.5.1
* \version 0.5.14
*
* \date 08/10/2017
*
Expand Down Expand Up @@ -665,7 +665,7 @@ std::string TelemetryData::Log()

const char* TelemetryData::getLabel()
{
return "DOWNLINK";
return "Downlink";
}

void TelemetryData::ForceDisplay(std::vector<std::string> data)
Expand Down
4 changes: 2 additions & 2 deletions src/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*
* \author Gabriel Mariano Marcelino <[email protected]>
*
* \version 0.5.13
* \version 0.6.0
*
* \date 13/02/2019
*
Expand All @@ -37,7 +37,7 @@
#ifndef VERSION_H_
#define VERSION_H_

#define GRS_SOFTWARE_VERSION "0.5.13"
#define GRS_SOFTWARE_VERSION "0.6.0"

#endif // VERSION_H_

Expand Down

0 comments on commit defb4ee

Please sign in to comment.