Commit 2ae70e3c authored by Doc's avatar Doc 💀
Browse files

Sanity checking, removing extra debug binaries

parent 34a0418e
Loading
Loading
Loading
Loading

.gitignore

0 → 100644
+4 −0
Original line number Diff line number Diff line
/MatrixOrbital/bin
/MatrixOrbital/obj/Debug
/testing/bin
/testing/obj/Debug
 No newline at end of file
+12 −1
Original line number Diff line number Diff line
@@ -31,6 +31,17 @@ internal static class SerialControl {
}

public static class Display {
    public static void WriteText(this SerialPort? device, string text) {
        /* MatrixOrbital.Display.WriteText(device, text) 
            Clears the contents of the display.
            device  (required) device name of the controller
            text    (required) text to write
        */
        bool sanity = SerialControl.CheckSerialPermissionAndOpen(device);
        if (sanity) return;
        device.Write(text);
        device.Close();
    }
    public static void ClearDisplay(this SerialPort? device) {
        /* MatrixOrbital.Display.ClearDisplay(device) 
            Clears the contents of the display.
@@ -132,7 +143,7 @@ public static class LED {
            device  (required) device name of the controller
            led     (required) led from top to bottom (0-2)
            color   (required) color from 0-3:
                               0: yellow, 1: green, 2: red, 3: off
                               0: none, 1: green, 2: red, 3: yellow
        */
        if (led < 0 || led > 2 || color < 0 || color > 3) {
            throw new ArgumentOutOfRangeException("LED configuration is invalid. Make sure led is a positive value less than 3 or color is a positive value less than 4.");
Loading