File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -85,6 +85,10 @@ void KerbalSimpit::deregisterChannel(byte channelID)
8585 _send (DEREGISTER_MESSAGE , &channelID, 1 );
8686}
8787
88+ void KerbalSimpit::requestMessageOnChannel (byte channelID){
89+ _send (REQUEST_MESSAGE , &channelID, 1 );
90+ }
91+
8892void KerbalSimpit::printToKSP (String msg){
8993 printToKSP (msg, 0 );
9094}
Original file line number Diff line number Diff line change @@ -138,6 +138,14 @@ class KerbalSimpit
138138 void printToKSP (String msg);
139139 void printToKSP (String msg, byte options);
140140
141+ /* *
142+ * Ask Simpit to resend a message on the given channel (useful for channels that only send on change).
143+ * When subscribing on a channel, a message is automatically sent so there is no need to call this during init.
144+ * May not work on all channels.
145+ * @param channelID The channel ID to request from (taken from the OutboundPackets enum). Use 0 as a special value for all channels
146+ */
147+ void requestMessageOnChannel (byte channelID);
148+
141149 /* *
142150 * Number of message dropped due to corrupted packet (missing data or bad checksum).
143151 * This may not be accurate in all cases, some packets can be lost without being noticed here in case of extreme congestion.
Original file line number Diff line number Diff line change @@ -238,6 +238,10 @@ enum InboundPackets
238238 /** Deregister, indicate that no further messages
239239 for the given channel should be sent. */
240240 DEREGISTER_MESSAGE = 9 ,
241+ /** Request a new message to be sent on this channel (used for channel that only send message on request).
242+ * If requested on the channel 0, it will trigger a new message on all subscribed channels.
243+ * May not work on all channels. */
244+ REQUEST_MESSAGE = 29 ,
241245 // Custom action packets activate and deactivate custom action groups
242246 /** Activate the given Custom Action Group(s). */
243247 CAGACTIVATE_MESSAGE = 10 ,
You can’t perform that action at this time.
0 commit comments