-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- lib-devices : Added support for adc MCP3424 - lib-display : DisplayHandler is now a free function - lib-hal : Removed class LedBlink. The status led functionality is now in class Hardware - lib-rdmsensors : Added support for thermistor. Based on https://www.abelectronics.co.uk/p/69/adc-pi-raspberry-pi-analogue-to-digital-converter with https://www.adafruit.com/product/372
- Loading branch information
Showing
109 changed files
with
33,697 additions
and
36,941 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* @file software_version.h | ||
* | ||
*/ | ||
/* Copyright (C) 2022 by Arjan van Vught mailto:[email protected] | ||
/* Copyright (C) 2022-2023 by Arjan van Vught mailto:[email protected] | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
|
@@ -26,6 +26,6 @@ | |
#ifndef SOFTWARE_VERSION_H_ | ||
#define SOFTWARE_VERSION_H_ | ||
|
||
constexpr char SOFTWARE_VERSION[] = "1.2"; | ||
constexpr char SOFTWARE_VERSION[] = "1.3"; | ||
|
||
#endif /* SOFTWARE_VERSION_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* @file main.cpp | ||
* | ||
*/ | ||
/* Copyright (C) 2021-2022 by Arjan van Vught mailto:[email protected] | ||
/* Copyright (C) 2021-2023 by Arjan van Vught mailto:[email protected] | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
|
@@ -28,7 +28,6 @@ | |
|
||
#include "hardware.h" | ||
#include "network.h" | ||
#include "ledblink.h" | ||
#include "display.h" | ||
|
||
#include "widget.h" | ||
|
@@ -53,7 +52,6 @@ static constexpr TRDMDeviceInfoData deviceLabel ALIGNED = { const_cast<char*>("G | |
void main() { | ||
Hardware hw; | ||
Network nw; | ||
LedBlink lb; | ||
Display display; // Not supported, yet. | ||
|
||
ConfigStore configStore; | ||
|
@@ -103,6 +101,6 @@ void main() { | |
hw.WatchdogFeed(); | ||
widget.Run(); | ||
configStore.Flash(); | ||
lb.Run(); | ||
hw.Run(); | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* @file main.cpp | ||
* | ||
*/ | ||
/* Copyright (C) 2021-2022 by Arjan van Vught mailto:[email protected] | ||
/* Copyright (C) 2021-2023 by Arjan van Vught mailto:[email protected] | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
|
@@ -28,7 +28,6 @@ | |
|
||
#include "hardware.h" | ||
#include "network.h" | ||
#include "ledblink.h" | ||
|
||
#include "displayudf.h" | ||
#include "display_timeout.h" | ||
|
@@ -37,19 +36,30 @@ | |
#include "rdmpersonality.h" | ||
#include "rdmdeviceparams.h" | ||
#include "rdmsensorsparams.h" | ||
#include "rdmsubdevicesparams.h" | ||
#if defined (ENABLE_RDM_SUBDEVICES) | ||
# include "rdmsubdevicesparams.h" | ||
#endif | ||
|
||
#include "pixeldmxparams.h" | ||
#include "ws28xxdmx.h" | ||
#include "pixeldmxstartstop.h" | ||
#include "pixeldmxparamsrdm.h" | ||
#include "pixeltestpattern.h" | ||
|
||
#if !defined(NO_EMAC) | ||
# include "remoteconfig.h" | ||
# include "remoteconfigparams.h" | ||
# include "storeremoteconfig.h" | ||
# include "storenetwork.h" | ||
#endif | ||
|
||
#include "configstore.h" | ||
#include "storepixeldmx.h" | ||
#include "storerdmdevice.h" | ||
#include "storerdmsensors.h" | ||
#include "storerdmsubdevices.h" | ||
#if defined (ENABLE_RDM_SUBDEVICES) | ||
# include "storerdmsubdevices.h" | ||
#endif | ||
#include "storedisplayudf.h" | ||
|
||
#include "firmwareversion.h" | ||
|
@@ -64,17 +74,21 @@ void Hardware::RebootHandler() { | |
void main() { | ||
Hardware hw; | ||
Network nw; | ||
LedBlink lb; | ||
DisplayUdf display; | ||
FirmwareVersion fw(SOFTWARE_VERSION, __DATE__, __TIME__); | ||
|
||
ConfigStore configStore; | ||
|
||
lb.SetMode(ledblink::Mode::OFF_ON); | ||
|
||
const auto isConfigMode = is_config_mode(); | ||
|
||
fw.Print(); | ||
fw.Print("RDM Responder"); | ||
|
||
#if !defined(NO_EMAC) | ||
StoreNetwork storeNetwork; | ||
nw.SetNetworkStore(&storeNetwork); | ||
nw.Init(&storeNetwork); | ||
nw.Print(); | ||
#endif | ||
|
||
PixelDmxConfiguration pixelDmxConfiguration; | ||
|
||
|
@@ -117,6 +131,17 @@ void main() { | |
|
||
PixelDmxParamsRdm pixelDmxParamsRdm(&storePixelDmx); | ||
|
||
char aDescription[rdm::personality::DESCRIPTION_MAX_LENGTH]; | ||
snprintf(aDescription, sizeof(aDescription) - 1U, "%s:%u G%u [%s]", | ||
PixelType::GetType(pixelDmxConfiguration.GetType()), | ||
pixelDmxConfiguration.GetCount(), | ||
pixelDmxConfiguration.GetGroupingCount(), | ||
PixelType::GetMap(pixelDmxConfiguration.GetMap())); | ||
|
||
RDMPersonality *personalities[2] = { new RDMPersonality(aDescription, &pixelDmx), new RDMPersonality("Config mode", &pixelDmxParamsRdm) }; | ||
|
||
RDMResponder rdmResponder(personalities, 2); | ||
|
||
StoreRDMSensors storeRdmSensors; | ||
RDMSensorsParams rdmSensorsParams(&storeRdmSensors); | ||
|
||
|
@@ -125,24 +150,16 @@ void main() { | |
rdmSensorsParams.Dump(); | ||
} | ||
|
||
#if defined (ENABLE_RDM_SUBDEVICES) | ||
StoreRDMSubDevices storeRdmSubDevices; | ||
RDMSubDevicesParams rdmSubDevicesParams(&storeRdmSubDevices); | ||
|
||
if (rdmSubDevicesParams.Load()) { | ||
rdmSubDevicesParams.Set(); | ||
rdmSubDevicesParams.Dump(); | ||
} | ||
#endif | ||
|
||
char aDescription[rdm::personality::DESCRIPTION_MAX_LENGTH]; | ||
snprintf(aDescription, sizeof(aDescription) - 1U, "%s:%u G%u [%s]", | ||
PixelType::GetType(pixelDmxConfiguration.GetType()), | ||
pixelDmxConfiguration.GetCount(), | ||
pixelDmxConfiguration.GetGroupingCount(), | ||
PixelType::GetMap(pixelDmxConfiguration.GetMap())); | ||
|
||
RDMPersonality *personalities[2] = { new RDMPersonality(aDescription, &pixelDmx), new RDMPersonality("Config mode", &pixelDmxParamsRdm) }; | ||
|
||
RDMResponder rdmResponder(personalities, 2); | ||
rdmResponder.Init(); | ||
|
||
StoreRDMDevice storeRdmDevice; | ||
|
@@ -170,6 +187,19 @@ void main() { | |
printf("Test pattern : %s [%u]\n", PixelPatterns::GetName(nTestPattern), static_cast<uint32_t>(nTestPattern)); | ||
} | ||
|
||
#if !defined(NO_EMAC) | ||
RemoteConfig remoteConfig(remoteconfig::Node::RDMNET_LLRP_ONLY, remoteconfig::Output::PIXEL); | ||
RemoteConfigParams remoteConfigParams(new StoreRemoteConfig); | ||
|
||
if(remoteConfigParams.Load()) { | ||
remoteConfigParams.Set(&remoteConfig); | ||
remoteConfigParams.Dump(); | ||
} | ||
|
||
while (configStore.Flash()) | ||
; | ||
#endif | ||
|
||
display.SetTitle("RDM Responder Pixel 1"); | ||
display.Set(2, displayudf::Labels::VERSION); | ||
display.Set(6, displayudf::Labels::DMX_START_ADDRESS); | ||
|
@@ -183,8 +213,8 @@ void main() { | |
DisplayUdfParams displayUdfParams(&storeDisplayUdf); | ||
|
||
if (displayUdfParams.Load()) { | ||
displayUdfParams.Set(&display); | ||
displayUdfParams.Dump(); | ||
displayUdfParams.Set(&display); | ||
} | ||
|
||
display.Show(); | ||
|
@@ -199,18 +229,21 @@ void main() { | |
display.Printf(6, "%s:%u", PixelPatterns::GetName(nTestPattern), static_cast<uint32_t>(nTestPattern)); | ||
} | ||
|
||
lb.SetMode(ledblink::Mode::NORMAL); | ||
|
||
hw.SetMode(hardware::ledblink::Mode::NORMAL); | ||
hw.WatchdogInit(); | ||
|
||
for(;;) { | ||
hw.WatchdogFeed(); | ||
rdmResponder.Run(); | ||
configStore.Flash(); | ||
#if !defined(NO_EMAC) | ||
nw.Run(); | ||
remoteConfig.Run(); | ||
#endif | ||
if (__builtin_expect((PixelTestPattern::GetPattern() != pixelpatterns::Pattern::NONE), 0)) { | ||
pixelTestPattern.Run(); | ||
} | ||
display.Run(); | ||
lb.Run(); | ||
hw.Run(); | ||
} | ||
} |
Oops, something went wrong.