Skip to content

Commit 446c13b

Browse files
mkalkbrennerfreezy
authored andcommitted
removed RGBorder setting for ZeDMD
1 parent 405354d commit 446c13b

File tree

15 files changed

+18
-62
lines changed

15 files changed

+18
-62
lines changed

Console/Common/BaseCommand.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ protected List<IDestination> GetRenderers(IConfiguration config, HashSet<string>
8383
}
8484

8585
if (config.ZeDMD.Enabled) {
86-
var zeDMD = ZeDMD.GetInstance(config.ZeDMD.Debug, config.ZeDMD.Brightness, config.ZeDMD.RgbOrder, config.ZeDMDHD.Port);
86+
var zeDMD = ZeDMD.GetInstance(config.ZeDMD.Debug, config.ZeDMD.Brightness, config.ZeDMDHD.Port);
8787
if (zeDMD.IsAvailable) {
8888
renderers.Add(zeDMD);
8989
Logger.Info("Added ZeDMD renderer.");
@@ -95,7 +95,7 @@ protected List<IDestination> GetRenderers(IConfiguration config, HashSet<string>
9595
}
9696

9797
if (config.ZeDMDHD.Enabled) {
98-
var zeDMDHD = ZeDMDHD.GetInstance(config.ZeDMDHD.Debug, config.ZeDMDHD.Brightness, config.ZeDMDHD.RgbOrder, config.ZeDMDHD.Port);
98+
var zeDMDHD = ZeDMDHD.GetInstance(config.ZeDMDHD.Debug, config.ZeDMDHD.Brightness, config.ZeDMDHD.Port);
9999
if (zeDMDHD.IsAvailable) {
100100
renderers.Add(zeDMDHD);
101101
Logger.Info("Added ZeDMD renderer.");
@@ -107,7 +107,7 @@ protected List<IDestination> GetRenderers(IConfiguration config, HashSet<string>
107107
}
108108

109109
if (config.ZeDMDWiFi.Enabled) {
110-
var zeDMDWiFi = ZeDMDWiFi.GetInstance(config.ZeDMDWiFi.Debug, config.ZeDMDWiFi.Brightness, config.ZeDMDWiFi.RgbOrder, config.ZeDMDWiFi.WifiAddress);
110+
var zeDMDWiFi = ZeDMDWiFi.GetInstance(config.ZeDMDWiFi.Debug, config.ZeDMDWiFi.Brightness, config.ZeDMDWiFi.WifiAddress);
111111
if (zeDMDWiFi.IsAvailable) {
112112
renderers.Add(zeDMDWiFi);
113113
Logger.Info("Added ZeDMD WiFi renderer.");
@@ -119,7 +119,7 @@ protected List<IDestination> GetRenderers(IConfiguration config, HashSet<string>
119119
}
120120

121121
if (config.ZeDMDHDWiFi.Enabled) {
122-
var zeDMDHDWiFi = ZeDMDHDWiFi.GetInstance(config.ZeDMDHDWiFi.Debug, config.ZeDMDHDWiFi.Brightness, config.ZeDMDHDWiFi.RgbOrder, config.ZeDMDHD.Port, config.ZeDMDHDWiFi.WifiAddress);
122+
var zeDMDHDWiFi = ZeDMDHDWiFi.GetInstance(config.ZeDMDHDWiFi.Debug, config.ZeDMDHDWiFi.Brightness, config.ZeDMDHD.Port, config.ZeDMDHDWiFi.WifiAddress);
123123
if (zeDMDHDWiFi.IsAvailable) {
124124
renderers.Add(zeDMDHDWiFi);
125125
Logger.Info("Added ZeDMD HD WiFi renderer.");

Console/Common/BaseOptions.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,6 @@ internal abstract class BaseOptions : IConfiguration
148148
[Option("zedmd-brightness", HelpText = "Change ZeDMD brightness between 0 and 15.")]
149149
public int Brightness { get; set; } = -1;
150150

151-
[Option("zedmd-rgborder", HelpText = "Change ZeDMD RGB order between 0 and 5.")]
152-
public int RgbOrder { get; set; } = -1;
153-
154151
[Option("zedmd-wifi-address", HelpText = "Connect to ZeDMD in WiFi mode using this IP address. If not provided, a connection to zedmd-wifi.local will be established.")]
155152
public string WifiAddress { get; set; } = null;
156153

@@ -390,7 +387,6 @@ public ZeDMDOptions(BaseOptions options)
390387
_options.Destination == BaseOptions.DestinationType.zeDMD;
391388
public bool Debug => _options.Debug;
392389
public int Brightness => _options.Brightness;
393-
public int RgbOrder => _options.RgbOrder;
394390
public string Port => _options.Port;
395391
}
396392

@@ -407,7 +403,6 @@ public ZeDMDHDOptions(BaseOptions options)
407403
_options.Destination == BaseOptions.DestinationType.zeDMDHD;
408404
public bool Debug => _options.Debug;
409405
public int Brightness => _options.Brightness;
410-
public int RgbOrder => _options.RgbOrder;
411406
public string Port => _options.Port;
412407
}
413408

@@ -424,7 +419,6 @@ public ZeDMDWiFiOptions(BaseOptions options)
424419
_options.Destination == BaseOptions.DestinationType.zeDMDWiFi;
425420
public bool Debug => _options.Debug;
426421
public int Brightness => _options.Brightness;
427-
public int RgbOrder => _options.RgbOrder;
428422
public string Port => _options.Port;
429423
public string WifiAddress => _options.WifiAddress;
430424
}
@@ -442,7 +436,6 @@ public ZeDMDHDWiFiOptions(BaseOptions options)
442436
_options.Destination == BaseOptions.DestinationType.zeDMDHDWiFi;
443437
public bool Debug => _options.Debug;
444438
public int Brightness => _options.Brightness;
445-
public int RgbOrder => _options.RgbOrder;
446439
public string Port => _options.Port;
447440
public string WifiAddress => _options.WifiAddress;
448441
}

LibDmd.Test/DmdDevice/TestConfiguration.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ public class TestZeDMDConfig : IZeDMDConfig
109109
public bool Enabled { get; set; }
110110
public bool Debug { get; set; }
111111
public int Brightness { get; set; }
112-
public int RgbOrder { get; set; }
113112
public string Port { get; set; }
114113
}
115114

LibDmd/Costura32/zedmd.dll

1.5 KB
Binary file not shown.

LibDmd/Costura64/zedmd64.dll

1 KB
Binary file not shown.

LibDmd/DmdDevice/Configuration.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,6 @@ public class ZeDMDConfig : AbstractConfiguration, IZeDMDConfig
310310
public bool Enabled => GetBoolean("enabled", false);
311311
public bool Debug => GetBoolean("debug", false);
312312
public int Brightness => GetInt("brightness", -1);
313-
public int RgbOrder => GetInt("rgborder", -1);
314313
public string Port => GetString("port", null);
315314
public bool AllowHdScaling => false;
316315
public ZeDMDConfig(IniData data, Configuration parent) : base(data, parent)

LibDmd/DmdDevice/DmdDevice.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ private void SetupGraphs()
473473
}
474474
}
475475
if (_config.ZeDMD.Enabled) {
476-
var zeDmd = ZeDMD.GetInstance(_config.ZeDMD.Debug, _config.ZeDMD.Brightness, _config.ZeDMD.RgbOrder, _config.ZeDMD.Port);
476+
var zeDmd = ZeDMD.GetInstance(_config.ZeDMD.Debug, _config.ZeDMD.Brightness, _config.ZeDMD.Port);
477477
if (zeDmd.IsAvailable) {
478478
renderers.Add(zeDmd);
479479
Logger.Info("Added ZeDMD renderer.");
@@ -485,7 +485,7 @@ private void SetupGraphs()
485485
}
486486

487487
if (_config.ZeDMDHD.Enabled) {
488-
var zeDmdHd = ZeDMDHD.GetInstance(_config.ZeDMDHD.Debug, _config.ZeDMDHD.Brightness, _config.ZeDMDHD.RgbOrder, _config.ZeDMDHD.Port);
488+
var zeDmdHd = ZeDMDHD.GetInstance(_config.ZeDMDHD.Debug, _config.ZeDMDHD.Brightness, _config.ZeDMDHD.Port);
489489
if (zeDmdHd.IsAvailable) {
490490
renderers.Add(zeDmdHd);
491491
Logger.Info("Added ZeDMD HD renderer.");
@@ -494,7 +494,7 @@ private void SetupGraphs()
494494
}
495495
}
496496
if (_config.ZeDMDWiFi.Enabled) {
497-
var zeDmdWifi = ZeDMDWiFi.GetInstance(_config.ZeDMDWiFi.Debug, _config.ZeDMDWiFi.Brightness, _config.ZeDMDWiFi.RgbOrder, _config.ZeDMDWiFi.WifiAddress);
497+
var zeDmdWifi = ZeDMDWiFi.GetInstance(_config.ZeDMDWiFi.Debug, _config.ZeDMDWiFi.Brightness, _config.ZeDMDWiFi.WifiAddress);
498498
if (zeDmdWifi.IsAvailable) {
499499
renderers.Add(zeDmdWifi);
500500
Logger.Info("Added ZeDMD WiFi renderer.");
@@ -503,7 +503,7 @@ private void SetupGraphs()
503503
}
504504
}
505505
if (_config.ZeDMDHDWiFi.Enabled) {
506-
var zeDmdHdWifi = ZeDMDHDWiFi.GetInstance(_config.ZeDMDHDWiFi.Debug, _config.ZeDMDHDWiFi.Brightness, _config.ZeDMDHDWiFi.RgbOrder, _config.ZeDMDHDWiFi.WifiAddress);
506+
var zeDmdHdWifi = ZeDMDHDWiFi.GetInstance(_config.ZeDMDHDWiFi.Debug, _config.ZeDMDHDWiFi.Brightness, _config.ZeDMDHDWiFi.WifiAddress);
507507
if (zeDmdHdWifi.IsAvailable) {
508508
renderers.Add(zeDmdHdWifi);
509509
Logger.Info("Added ZeDMD HD WiFi renderer.");

LibDmd/DmdDevice/IConfiguration.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ public interface IZeDMDConfig
7373
bool Enabled { get; }
7474
bool Debug { get; }
7575
int Brightness { get; }
76-
int RgbOrder { get; }
7776
string Port { get; }
7877
}
7978

LibDmd/Output/ZeDMD/ZeDMD.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ public class ZeDMD : ZeDMDUsbBase, IRgb24Destination, IRgb565Destination, IFixed
1919
/// Returns the current instance of ZeDMD.
2020
/// </summary>
2121
/// <returns>New or current instance</returns>
22-
public static ZeDMD GetInstance(bool debug, int brightness, int rgbOrder, string port)
22+
public static ZeDMD GetInstance(bool debug, int brightness, string port)
2323
{
2424
if (_instance == null)
2525
{
26-
_instance = new ZeDMD { Debug = debug, Brightness = brightness, RgbOrder = rgbOrder, Port = port };
26+
_instance = new ZeDMD { Debug = debug, Brightness = brightness, Port = port };
2727
}
2828

2929
_instance.Init();

LibDmd/Output/ZeDMD/ZeDMDBase.cs

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ public abstract class ZeDMDBase
2121
public bool NeedsDuplicateFrames => false;
2222
protected bool Debug { get; set; }
2323
protected int Brightness { get; set; }
24-
protected int RgbOrder { get; set; }
2524

2625
protected IntPtr _pZeDMD = IntPtr.Zero;
2726
protected readonly Logger Logger = LogManager.GetCurrentClassLogger();
@@ -32,20 +31,14 @@ protected void Init()
3231
_pZeDMD = ZeDMD_GetInstance();
3332
}
3433

35-
protected void SendConfiguration(bool save = false)
34+
protected void SendConfiguration()
3635
{
3736
if (Debug) {
3837
ZeDMD_EnableDebug(_pZeDMD);
3938
}
4039
if (Brightness >= 0 && Brightness <= 15) {
4140
ZeDMD_SetBrightness(_pZeDMD, Brightness);
4241
}
43-
if (RgbOrder >= 0 && RgbOrder <= 5) {
44-
ZeDMD_SetRGBOrder(_pZeDMD, RgbOrder);
45-
}
46-
if (save) {
47-
ZeDMD_SaveSettings(_pZeDMD);
48-
}
4942
}
5043

5144
public void ClearDisplay()
@@ -137,20 +130,6 @@ public void ClearColor()
137130
#endif
138131
protected static extern void ZeDMD_SetBrightness(IntPtr pZeDMD, int brightness);
139132

140-
#if PLATFORM_X64
141-
[DllImport("zedmd64.dll", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)]
142-
#else
143-
[DllImport("zedmd.dll", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)]
144-
#endif
145-
protected static extern void ZeDMD_SetRGBOrder(IntPtr pZeDMD, int order);
146-
147-
#if PLATFORM_X64
148-
[DllImport("zedmd64.dll", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)]
149-
#else
150-
[DllImport("zedmd.dll", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)]
151-
#endif
152-
protected static extern void ZeDMD_SaveSettings(IntPtr pZeDMD);
153-
154133
#if PLATFORM_X64
155134
[DllImport("zedmd64.dll", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)]
156135
#else

0 commit comments

Comments
 (0)