Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
actuators_faulhaber.h
Go to the documentation of this file.
1/*
2 * Copyright (C) Freek van Tienen <freek.v.tienen@gmail.com>
3 *
4 * This file is part of paparazzi
5 *
6 * paparazzi is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * paparazzi is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with paparazzi; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 */
20
27#ifndef ACTUATORS_FAULHABER_H
28#define ACTUATORS_FAULHABER_H
29
30#include "std.h"
31
39
55extern struct faulhaber_t faulhaber;
56
57extern void actuators_faulhaber_init(void);
58extern void actuators_faulhaber_periodic(void);
59extern void actuators_faulhaber_event(void);
61extern void actuators_faulhaber_set(uint8_t idx, int16_t value);
62
63
64#define ACTUATORS_FAULHABER_COMMAND_SCALE 1000.0f
65
66#define ActuatorFaulhaberSet actuators_faulhaber_set
67#define ActuatorsFaulhaberInit() actuators_faulhaber_init()
68#define ActuatorsFaulhaberCommit() {}
69
70#endif /* ACTUATORS_FAULHABER_H */
float p_gain
The proportional gain of the velocity controller.
int32_t max_velocity
The maximum velocity of the controller.
int32_t real_position
The real position from the feedback of the controller.
void actuators_faulhaber_event(void)
bool target_reached
When the target position is reached.
struct faulhaber_t faulhaber
enum faulhaber_modes_t mode
Current mode of the controller.
bool homing_completed
Once the homing is completed.
int32_t setpoint_position
The setpoint position controlled from the actuator.
int32_t target_velocity
The target velocity send to the controller.
void actuators_faulhaber_set(uint8_t idx, int16_t value)
uint8_t state
The state of the mode.
bool position_ready
Ready for receiving (new) positions.
faulhaber_modes_t
@ FH_MODE_ERROR
@ FH_MODE_VELOCITY
@ FH_MODE_RESET_ERR
@ FH_MODE_REQ_ERR
@ FH_MODE_INIT
void actuators_faulhaber_periodic(void)
void actuators_faulhaber_init(void)
void actuators_faulhaber_SetMode(uint8_t mode)
static uint32_t idx
static uint8_t mode
mode holds the current sonar mode mode = 0 used at high altitude, uses 16 wave patterns mode = 1 used...
Definition sonar_bebop.c:65
int int32_t
Typedef defining 32 bit int type.
short int16_t
Typedef defining 16 bit short type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.