PX4 Firmware
PX4 Autopilot Software http://px4.io
roboclaw_main.cpp File Reference

RoboClaw Motor Driver. More...

#include <px4_platform_common/px4_config.h>
#include <px4_platform_common/log.h>
#include <px4_platform_common/module.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <parameters/param.h>
#include <arch/board/board.h>
#include "RoboClaw.hpp"
Include dependency graph for roboclaw_main.cpp:

Go to the source code of this file.

Functions

__EXPORT int roboclaw_main (int argc, char *argv[])
 Deamon management function. More...
 
int roboclaw_thread_main (int argc, char *argv[])
 Mainloop of deamon. More...
 
static void usage ()
 Print the correct usage. More...
 

Variables

static bool thread_running = false
 Deamon status flag. More...
 
px4_task_t deamon_task
 

Detailed Description

Function Documentation

◆ roboclaw_main()

int roboclaw_main ( int  argc,
char *  argv[] 
)

Deamon management function.

The deamon app only briefly exists to start the background job.

The stack size assigned in the Makefile does only apply to this management task.

The actual stack size should be set in the call to task_create().

Definition at line 133 of file roboclaw_main.cpp.

References deamon_task, roboclaw_thread_main(), RoboClaw::taskShouldExit, thread_running, and usage().

Here is the call graph for this function:

◆ roboclaw_thread_main()

int roboclaw_thread_main ( int  argc,
char *  argv[] 
)

Mainloop of deamon.

Definition at line 178 of file roboclaw_main.cpp.

References RoboClaw::taskMain(), and thread_running.

Referenced by roboclaw_main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ usage()

static void usage ( void  )
static

Print the correct usage.

Definition at line 78 of file roboclaw_main.cpp.

Referenced by roboclaw_main().

Here is the caller graph for this function:

Variable Documentation

◆ deamon_task

px4_task_t deamon_task

Definition at line 61 of file roboclaw_main.cpp.

Referenced by roboclaw_main().

◆ thread_running

bool thread_running = false
static

Deamon status flag.

Definition at line 60 of file roboclaw_main.cpp.

Referenced by roboclaw_main(), and roboclaw_thread_main().