Skip to content

Commit

Permalink
Fixes for nasa/fprime#2831 (#71)
Browse files Browse the repository at this point in the history
* Fixes for nasa/fprime#2831

* Missing logger import
  • Loading branch information
LeStarch authored Aug 16, 2024
1 parent da52dfa commit 7c8f0a1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 3 additions & 1 deletion LedBlinker/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#include <getopt.h>
// Used for printf functions
#include <cstdlib>
// Os Console
#include <Os/Console.hpp>

/**
* \brief print commandline help message
Expand Down Expand Up @@ -50,7 +52,7 @@ int main(int argc, char* argv[]) {
U32 port_number = 0;
I32 option = 0;
char* hostname = nullptr;

Os::Console::init();
// Loop while reading the getopt supplied options
while ((option = getopt(argc, argv, "hp:a:")) != -1) {
switch (option) {
Expand Down
7 changes: 2 additions & 5 deletions LedBlinker/Top/LedBlinkerTopology.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
// Provides access to autocoded functions
#include <LedBlinker/Top/LedBlinkerPacketsAc.hpp>
#include <LedBlinker/Top/LedBlinkerTopologyAc.hpp>
#include <Fw/Logger/Logger.hpp>

// Necessary project-specified types
#include <Fw/Types/MallocAllocator.hpp>
#include <Os/Log.hpp>
#include <Svc/FramingProtocol/FprimeProtocol.hpp>

// Used for 1Hz synthetic cycling
Expand All @@ -19,9 +19,6 @@
// Allows easy reference to objects in FPP/autocoder required namespaces
using namespace LedBlinker;

// Instantiate a system logger that will handle Fw::Logger::logMsg calls
Os::Log logger;

// The reference topology uses a malloc-based allocator for components that need to allocate memory during the
// initialization phase.
Fw::MallocAllocator mallocator;
Expand Down Expand Up @@ -116,7 +113,7 @@ void configureTopology() {
// tlmSend.setPacketList(LedBlinkerPacketsPkts, LedBlinkerPacketsIgnore, 1);
bool gpio_success = gpioDriver.open(13, Drv::LinuxGpioDriver::GpioDirection::GPIO_OUT);
if (!gpio_success) {
Fw::Logger::logMsg("[ERROR] Failed to open GPIO pin\n");
Fw::Logger::log("[ERROR] Failed to open GPIO pin\n");
}
}

Expand Down

0 comments on commit 7c8f0a1

Please sign in to comment.