示例#1
0
 /// <summary>
 /// Defines a message to display.
 /// </summary>
 /// Sets a message to display
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='text'>
 /// The text to display.
 /// </param>
 /// <param name='scrollSpeed'>
 /// The text to display.
 /// </param>
 /// <param name='textColourR'>
 /// The text color (red).
 /// </param>
 /// <param name='textColourG'>
 /// The text color (green).
 /// </param>
 /// <param name='textColourB'>
 /// The text color (blue).
 /// </param>
 /// <param name='backColourR'>
 /// The text color (red).
 /// </param>
 /// <param name='backColourG'>
 /// The text color (green).
 /// </param>
 /// <param name='backColourB'>
 /// The text color (blue).
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task LedPOSTAsync(this ISenseHatClientClient operations, string text, double scrollSpeed, double textColourR, double textColourG, double textColourB, double backColourR, double backColourG, double backColourB, CancellationToken cancellationToken = default(CancellationToken))
 {
     await operations.LedPOSTWithHttpMessagesAsync(text, scrollSpeed, textColourR, textColourG, textColourB, backColourR, backColourG, backColourB, null, cancellationToken).ConfigureAwait(false);
 }
示例#2
0
 /// <summary>
 /// Defines one led pixel color
 /// </summary>
 /// Sets one led color
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='x'>
 /// x position for the led.
 /// </param>
 /// <param name='y'>
 /// y position for the led.
 /// </param>
 /// <param name='r'>
 /// Red value for the led.
 /// </param>
 /// <param name='g'>
 /// Green value for the led.
 /// </param>
 /// <param name='b'>
 /// Blue value for the led.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task LedPUTAsync(this ISenseHatClientClient operations, int x, int y, int r, int g, int b, CancellationToken cancellationToken = default(CancellationToken))
 {
     await operations.LedPUTWithHttpMessagesAsync(x, y, r, g, b, null, cancellationToken).ConfigureAwait(false);
 }
示例#3
0
 /// <summary>
 /// Defines a message to display.
 /// </summary>
 /// Sets a message to display
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='text'>
 /// The text to display.
 /// </param>
 /// <param name='scrollSpeed'>
 /// The text to display.
 /// </param>
 /// <param name='textColourR'>
 /// The text color (red).
 /// </param>
 /// <param name='textColourG'>
 /// The text color (green).
 /// </param>
 /// <param name='textColourB'>
 /// The text color (blue).
 /// </param>
 /// <param name='backColourR'>
 /// The text color (red).
 /// </param>
 /// <param name='backColourG'>
 /// The text color (green).
 /// </param>
 /// <param name='backColourB'>
 /// The text color (blue).
 /// </param>
 public static void LedPOST(this ISenseHatClientClient operations, string text, double scrollSpeed, double textColourR, double textColourG, double textColourB, double backColourR, double backColourG, double backColourB)
 {
     Task.Factory.StartNew(s => ((ISenseHatClientClient)s).LedPOSTAsync(text, scrollSpeed, textColourR, textColourG, textColourB, backColourR, backColourG, backColourB), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }
示例#4
0
 /// <summary>
 /// Defines one led pixel color
 /// </summary>
 /// Sets one led color
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='x'>
 /// x position for the led.
 /// </param>
 /// <param name='y'>
 /// y position for the led.
 /// </param>
 /// <param name='r'>
 /// Red value for the led.
 /// </param>
 /// <param name='g'>
 /// Green value for the led.
 /// </param>
 /// <param name='b'>
 /// Blue value for the led.
 /// </param>
 public static void LedPUT(this ISenseHatClientClient operations, int x, int y, int r, int g, int b)
 {
     Task.Factory.StartNew(s => ((ISenseHatClientClient)s).LedPUTAsync(x, y, r, g, b), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }