Skip to content

Commit 58f3659

Browse files
peterbarkerclaude
andcommitted
SRV_Channel: move library-specific definitions into .h from _config.h
the _config.h files are *not* supposed to be some sort of externally-visible-vs-internally-visibly split for library defines. They are expected to be the bare minimum to allow the feature defines to work. Move as much information as sensible back from _config.h to .h file Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 8baa1cb commit 58f3659

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

libraries/SRV_Channel/SRV_Channel.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@
2525

2626
#include "SRV_Channel_config.h"
2727

28+
#ifndef ACTUATOR_CHANNELS
29+
#define ACTUATOR_CHANNELS 6
30+
#endif
31+
32+
#define ACTUATOR_DEFAULT_INCREMENT 0.01
33+
2834
static_assert(NUM_SERVO_CHANNELS <= 32, "More than 32 servos not supported");
2935

3036
class SRV_Channels;

libraries/SRV_Channel/SRV_Channel_config.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@
66
#define AP_SRV_CHANNELS_ENABLED 1
77
#endif
88

9-
#ifndef ACTUATOR_CHANNELS
10-
#define ACTUATOR_CHANNELS 6
11-
#endif
12-
13-
#define ACTUATOR_DEFAULT_INCREMENT 0.01
14-
159
#ifndef NUM_SERVO_CHANNELS
1610
#if HAL_PROGRAM_SIZE_LIMIT_KB > 1024
1711
#define NUM_SERVO_CHANNELS 32

0 commit comments

Comments
 (0)