Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
vanvught committed Dec 31, 2024
1 parent fa297f5 commit 2d83530
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 54 deletions.
2 changes: 1 addition & 1 deletion opi_emac_ltc_smpte/.settings/language.settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuildCommandParser" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser" keep-relative-paths="false" name="CDT GCC Build Output Parser" parameter="([^/\\\\]*)((g?cc)|([gc]\+\+)|(clang))" prefer-non-shared="true"/>
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="1329438313648019008" id="org.eclipse.embedcdt.managedbuild.cross.arm.core.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Arm Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="1405723372371715708" id="org.eclipse.embedcdt.managedbuild.cross.arm.core.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Arm Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
Expand Down
46 changes: 38 additions & 8 deletions opi_emac_ltc_smpte/firmware/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,45 @@
# include "shell/shell.h"
#endif

#include "net/protocol/ntp.h"

static ltc::Source ltcSource;

namespace ntpclient {
void display_status(const ::ntp::Status status) {
if (ltcSource != ltc::Source::SYSTIME) {
return;
}

switch (status) {
case ::ntp::Status::STOPPED:
Display::Get()->TextStatus("No NTP Client");
break;
case ::ntp::Status::IDLE:
LtcOutputs::Get()->ResetTimeCodeTypePrevious();
Display::Get()->TextStatus("NTP Client");
break;
case ::ntp::Status::LOCKED:
Display::Get()->TextStatus("NTP Client LOCKED");
break;
case ::ntp::Status::FAILED:
Display::Get()->TextStatus("Error: NTP");
break;
default:
break;
}
}
} // namespace ntpclient

namespace hal {
void reboot_handler() {
// switch (ltcSource) {
// case ::ltc::Source::TCNET:
// TCNet::Get()->Stop();
// break;
// default:
// break;
// }
switch (ltcSource) {
case ::ltc::Source::TCNET:
TCNet::Get()->Stop();
break;
default:
break;
}

if (!ltc::g_DisabledOutputs.bMax7219) {
LtcDisplayMax7219::Get()->Init(2); // TODO WriteChar
Expand Down Expand Up @@ -176,7 +206,7 @@ int main() {
SystimeReader sysTimeReader(ltcParams.GetFps(), ltcParams.GetUtcOffset());
LtcEtcReader ltcEtcReader;

ltc::Source ltcSource = ltcParams.GetSource();
ltcSource = ltcParams.GetSource();

LtcDisplayParams ltcDisplayParams;

Expand Down
45 changes: 0 additions & 45 deletions opi_emac_ltc_smpte/lib/ntpclientdisplay.cpp

This file was deleted.

0 comments on commit 2d83530

Please sign in to comment.