Example #1
0
 /// <summary>
 /// Asynchronously gets a summary of the party system's capabilities.
 /// </summary>
 /// <returns>The system's capabilities</returns>
 public static async Task <BoardCapability> GetBoardCapabilityAsync(this ArduinoSession session)
 {
     session.RequestBoardCapability();
     //return await Task.Run(() =>
     //    (BoardCapability)((FirmataMessage)session.GetMessageFromQueue(new FirmataMessage(MessageType.CapabilityResponse))).Value);
     return(await Task.Run(() => session.GetMessageFromQueue <BoardCapability>().Value).ConfigureAwait(false));
 }
Example #2
0
 /// <summary>
 /// Gets a summary of the party system's capabilities.
 /// </summary>
 /// <returns>The system's capabilities</returns>
 public static BoardCapability GetBoardCapability(this ArduinoSession session)
 {
     session.RequestBoardCapability();
     //return (BoardCapability)((FirmataMessage)session.GetMessageFromQueue(new FirmataMessage(MessageType.CapabilityResponse))).Value;
     return(session.GetMessageFromQueue <BoardCapability>().Value);
 }