ReduxLib C++ 2025.0.0-beta2
Loading...
Searching...
No Matches
CanandmagDetails.h
1// Copyright (c) Redux Robotics and other contributors.
2// This is open source and can be modified and shared under the 3-clause BSD license.
3
4#pragma once
5#include <cinttypes>
6#include <vector>
7
8/**
9 * Namespace for Canandmag-specific constants and details not generally needed by end users
10 */
12// constants_compiler: begin vendordep_Canandmag_cpp
13
14/** Canandmag-specific CAN message IDs*/
15class Message {
16public:
17enum : uint8_t {
18 /** Message id for Position frame */
20 /** Message id for Velocity frame */
22 /** Message id for Raw position frame */
24
25 // common to all devices
26
27 /** Message id for setting control command */
29 /** Message id for update setting on device */
31 /** Message id for setting value report from device */
33 /** Message id for clear device sticky faults */
35 /** Message id for status frames */
36 kStatus = 0x6,
37 /** Message id for party mode */
39};};
40
41/** Setting IDs valid for Canandmag */
42class Setting {
43public:
44enum : uint8_t {
45 /** Setting msg id for Encoder zero offset */
47 /** Setting msg id for Velocity window width (value*250us) */
49 /** Setting msg id for Position frame period (ms) */
51 /** Setting msg id for Velocity frame period (ms) */
53 /** Setting msg id for Raw position frame period (ms) */
55 /** Setting msg id for Invert direction (use cw instead of ccw) */
57 /** Setting msg id for Relative position value */
59 /** Setting msg id for Disable the zero button */
61 /** Setting msg id for status frame period (ms) */
63};};
64
65/** Canandmag-specific setting command IDs*/
67public:
68enum : uint8_t {
69 /** Setting command id for Fetch all settings from device */
71 /** Setting command id for Reset everything to factory default */
73 /** setting command for Fetch individual setting */
75 /** Setting command id for Factory defaults, but keep the encoder zero offset */
77}; };
78
79//constants_compiler: end
80
81/** std::vector of relevant settings IDS for the vendordep*/
82const std::vector<uint8_t> VDEP_SETTINGS = {
90};
91}
Definition: CanandmagDetails.h:15
@ kVelocityOutput
Definition: CanandmagDetails.h:21
@ kClearStickyFaults
Definition: CanandmagDetails.h:34
@ kPositionOutput
Definition: CanandmagDetails.h:19
@ kSettingCommand
Definition: CanandmagDetails.h:28
@ kPartyMode
Definition: CanandmagDetails.h:38
@ kSetSetting
Definition: CanandmagDetails.h:30
@ kStatus
Definition: CanandmagDetails.h:36
@ kReportSetting
Definition: CanandmagDetails.h:32
@ kRawPositionOutput
Definition: CanandmagDetails.h:23
@ kFetchSettings
Definition: CanandmagDetails.h:70
@ kResetFactoryDefaultKeepZero
Definition: CanandmagDetails.h:76
@ kResetFactoryDefault
Definition: CanandmagDetails.h:72
@ kFetchSettingValue
Definition: CanandmagDetails.h:74
Definition: CanandmagDetails.h:42
@ kStatusFramePeriod
Definition: CanandmagDetails.h:62
@ kVelocityFramePeriod
Definition: CanandmagDetails.h:52
@ kVelocityWindow
Definition: CanandmagDetails.h:48
@ kRawPositionFramePeriod
Definition: CanandmagDetails.h:54
@ kDisableZeroButton
Definition: CanandmagDetails.h:60
@ kInvertDirection
Definition: CanandmagDetails.h:56
@ kRelativePosition
Definition: CanandmagDetails.h:58
@ kPositionFramePeriod
Definition: CanandmagDetails.h:50
@ kZeroOffset
Definition: CanandmagDetails.h:46
Definition: CanandmagDetails.h:11
const std::vector< uint8_t > VDEP_SETTINGS
Definition: CanandmagDetails.h:82