Skip to content

Commit 4d74a1d

Browse files
authored
fix: Doc build issues in CI preventing API reference from showing properly on web (#534)
* fix: Doc build issues in CI preventing API reference from showing properly on web * fix title underline * cleaning up docs some * clean up build system some * fix docs * fix sp * cleanup
1 parent 32d791e commit 4d74a1d

File tree

42 files changed

+440
-422
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+440
-422
lines changed

.github/workflows/build_and_publish_docs.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,16 @@ jobs:
1313
contents: write
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@v5
1717
with:
18-
fetch-depth: 0
18+
fetch-depth: 1
1919
fetch-tags: true
2020

2121
- name: Set up Python
22-
uses: actions/setup-python@v5
22+
uses: actions/setup-python@v6
2323
with:
24-
python-version: "3.11"
24+
python-version: "3.13"
25+
cache: 'pip'
2526

2627
- name: Install Dependencies
2728
run: |
@@ -33,7 +34,7 @@ jobs:
3334
run: |
3435
cd doc
3536
# ignore if the following command fails
36-
build-docs -t esp32 -l en --project-path ../ --source-dir ./ --doxyfile_dir ./ || true
37+
build-docs -bs html -t esp32 -l en --project-path ../ --source-dir ./ --doxyfile_dir ./ || true
3738
mkdir -p ../docs
3839
cp -r _build/en/esp32/html/* ../docs/.
3940
# go to the latex output

components/csv/include/csv.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#pragma once
22

3+
#ifndef __gnu_linux__
34
#define __gnu_linux__
5+
#endif
46

57
#include "csv2/reader.hpp"
68
#include "csv2/writer.hpp"

components/drv2605/include/drv2605_menu.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Drv2605Menu {
2626
using Driver = espp::Drv2605;
2727

2828
/// @brief Construct a new Drv2605Menu object.
29-
/// @param i2c A vector of shared pointers to the Drv2605s to interact with.
29+
/// @param drivers A vector of shared pointers to DRV2605 drivers to control.
3030
explicit Drv2605Menu(const std::vector<std::shared_ptr<Driver>> &drivers)
3131
: drivers_(drivers) {}
3232

components/ftp/include/ftp_client_session.hpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -165,12 +165,8 @@ class FtpClientSession : public BaseComponent {
165165
}
166166

167167
/// \brief Receive data from the client.
168-
/// \details This function receives data from the client and stores it in
169-
/// the given buffer. This function uses the data socket and not the
170-
/// control socket, and handles both active and passive mode.
171-
/// \param buffer The buffer to store the data in.
172-
/// \param size The size of the buffer.
173-
/// \return The number of bytes received.
168+
/// \return The data received from the client, or std::nullopt if
169+
/// receiving the data failed.
174170
std::optional<std::vector<uint8_t>> receive_data() {
175171
if (is_passive_data_connection_) {
176172
if (!passive_socket_.is_valid()) {
@@ -653,7 +649,7 @@ class FtpClientSession : public BaseComponent {
653649
/// take a second parameter. The first parameter is denoted by a single
654650
/// Telnet character, as is the second Format parameter for ASCII and
655651
/// EBCDIC; the second parameter for local byte is a decimal integer to
656-
/// indicate Bytesize. The parameters are separated by a <SP> (Space,
652+
/// indicate Bytesize. The parameters are separated by a \<SP\> (Space,
657653
/// ASCII code 32).
658654
/// \param arguments The arguments to the TYPE command.
659655
/// \return True if the command was handled, false otherwise.

components/gt911/include/gt911.hpp

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ class Gt911 : public BasePeripheral<std::uint16_t> {
133133
POINT_5 = 0x816F,
134134
};
135135

136+
#pragma pack(push, 1)
137+
136138
// From Goodix library
137139
struct GTInfo {
138140
// 0x8140-0x814A
@@ -141,7 +143,7 @@ class Gt911 : public BasePeripheral<std::uint16_t> {
141143
uint16_t xResolution;
142144
uint16_t yResolution;
143145
uint8_t vendorId;
144-
} __attribute__((packed));
146+
};
145147

146148
struct GTPoint {
147149
// 0x814F-0x8156, ... 0x8176 (5 points)
@@ -150,25 +152,25 @@ class Gt911 : public BasePeripheral<std::uint16_t> {
150152
uint16_t y;
151153
uint16_t area;
152154
uint8_t reserved;
153-
} __attribute__((packed));
155+
};
154156

155157
struct GTLevelConfig {
156158
uint8_t touch; // Threshold of touch grow out of nothing
157159
uint8_t leave; // Threshold of touch decrease to nothing
158-
} __attribute__((packed));
160+
};
159161

160162
struct GTStylusConfig {
161163
uint8_t txGain;
162164
uint8_t rxGain;
163165
uint8_t dumpShift;
164166
GTLevelConfig level;
165167
uint8_t control; // Pen mode escape time out period (Unit: Sec)
166-
} __attribute__((packed));
168+
};
167169

168170
struct GTFreqHoppingConfig {
169171
uint16_t hoppingBitFreq;
170172
uint8_t hoppingFactor;
171-
} __attribute__((packed));
173+
};
172174

173175
struct GTKeyConfig {
174176
// Key position: 0-255 valid
@@ -182,7 +184,7 @@ class Gt911 : public BasePeripheral<std::uint16_t> {
182184
uint8_t sens12;
183185
uint8_t sens34;
184186
uint8_t restrain;
185-
} __attribute__((packed));
187+
};
186188

187189
struct GTConfig {
188190
// start at 0x8047
@@ -250,7 +252,9 @@ class Gt911 : public BasePeripheral<std::uint16_t> {
250252
// 0x8091
251253
uint8_t NC_5[2];
252254
GTKeyConfig keys;
253-
} __attribute__((packed));
255+
};
256+
257+
#pragma pack(pop)
254258

255259
std::atomic<bool> home_button_pressed_{false};
256260
std::atomic<uint8_t> num_touch_points_;

components/hid-rp/include/gamepad_imu.hpp

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,20 @@
44

55
namespace espp {
66
namespace gamepad {
7+
8+
#pragma pack(push, 1)
9+
710
/// Accelerometer data
811
struct Accelerometer {
912
union {
1013
struct {
1114
std::int16_t X;
1215
std::int16_t Y;
1316
std::int16_t Z;
14-
} __attribute__((packed));
17+
};
1518
std::int16_t raw[3];
16-
} __attribute__((packed));
17-
} __attribute__((packed));
19+
};
20+
};
1821

1922
/// Gyroscope data
2023
struct Gyroscope {
@@ -23,14 +26,17 @@ struct Gyroscope {
2326
std::int16_t X;
2427
std::int16_t Y;
2528
std::int16_t Z;
26-
} __attribute__((packed));
29+
};
2730
struct {
2831
std::int16_t Pitch;
2932
std::int16_t Yaw;
3033
std::int16_t Roll;
31-
} __attribute__((packed));
34+
};
3235
std::int16_t raw[3];
33-
} __attribute__((packed));
34-
} __attribute__((packed));
36+
};
37+
};
38+
39+
#pragma pack(pop)
40+
3541
} // namespace gamepad
3642
} // namespace espp

components/hid-rp/include/hid-rp-gamepad.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ class GamepadInputReport : public hid::report::base<hid::report::type::INPUT, RE
124124
}
125125

126126
/// Get the brake trigger value
127-
/// @return brake trigger value
127+
/// @param value brake trigger value
128128
constexpr void get_brake(TRIGGER_TYPE &value) const { value = trigger_axes[0]; }
129129

130130
/// Get the left trigger value
@@ -146,7 +146,7 @@ class GamepadInputReport : public hid::report::base<hid::report::type::INPUT, RE
146146
}
147147

148148
/// Get the accelerator trigger value
149-
/// @return accelerator trigger value
149+
/// @param value accelerator trigger value
150150
constexpr void get_accelerator(TRIGGER_TYPE &value) const { value = trigger_axes[1]; }
151151

152152
/// Get the right trigger value

components/hid-rp/include/hid-rp-playstation.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ enum class PlaystationHat {
181181
/// - Android seems to require Audio support, which it cannot find over BLE, so
182182
/// it does not work at all.
183183
///
184-
/// \section hid_rp_playstation_ex1 HID-RP Playstation Gamepad Example
184+
/// \section hid_rp_playstation_ex2 HID-RP Playstation Gamepad Example
185185
/// \snippet hid_rp_example.cpp hid rp example
186186
template <uint8_t REPORT_ID = 1>
187187
class PlaystationDualsenseBLESimpleInputReport

components/hid-rp/include/hid-rp-switch-pro.hpp

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ class SwitchProGamepadInputReport : public hid::report::base<hid::report::type::
7171
using Gyroscope = espp::gamepad::Gyroscope;
7272

7373
protected:
74+
#pragma pack(push, 1)
75+
7476
// union for the input report data
7577
union {
7678
// struct for the input report and follow-up data such as IMU or command
@@ -130,14 +132,14 @@ class SwitchProGamepadInputReport : public hid::report::base<hid::report::type::
130132
uint16_t joy_ly : 12;
131133
uint16_t joy_rx : 12;
132134
uint16_t joy_ry : 12;
133-
} __attribute__((packed));
134-
} __attribute__((packed));
135+
};
136+
};
135137
// Byte 11: Vibrator input report.
136138
// Decides if next vibration pattern should be sent.
137139
uint8_t vibrator_input_report;
138-
} __attribute__((packed)); // input report data struct
140+
}; // input report data struct
139141
uint8_t raw_input_report[12];
140-
} __attribute__((packed)); // input report data union
142+
}; // input report data union
141143
// Union for post-input report data such as IMU or command replies
142144
union {
143145
// for report IDs 0x30, 0x31, 0x32, 0x33, this is 6-axis data. 3 frames of 2
@@ -155,25 +157,27 @@ class SwitchProGamepadInputReport : public hid::report::base<hid::report::type::
155157
// Frame 2
156158
Accelerometer acc_2;
157159
Gyroscope gyro_2;
158-
} __attribute__((packed));
159-
} __attribute__((packed));
160-
} __attribute__((packed)); //
160+
};
161+
};
162+
}; //
161163
// 0x21 subcommand reply data; max len 35
162164
struct {
163165
uint8_t subcmd_ack;
164166
uint8_t subcmd_id;
165167
uint8_t subcmd_reply[35];
166-
} __attribute__((packed));
168+
};
167169
// TODO: for report ID 0x23, this is NFC/IR MCU FW update input report (max len 37)
168170
//
169171
// TODO: for report id 0x31, there are aditional 313 bytes of NFC/IR data input
170172
// after this.
171-
} __attribute__((packed)); // data union
172-
} __attribute__((packed)); // input report data struct
173+
}; // data union
174+
}; // input report data struct
173175
// this will ensure we always have enough space for the largest report
174176
// without having padding bytes defined anywhere.
175177
uint8_t raw_report[63];
176-
} __attribute__((packed));
178+
};
179+
180+
#pragma pack(pop)
177181

178182
static constexpr size_t num_data_bytes = 63;
179183

@@ -306,7 +310,7 @@ class SwitchProGamepadInputReport : public hid::report::base<hid::report::type::
306310
constexpr void set_left_trigger(float value) { set_trigger_axis(0, value); }
307311

308312
/// Set the right trigger value
309-
/// @param value The value to set the right trigger to.
313+
/// @param pressed Whether the right trigger is pressed or not
310314
constexpr void set_left_trigger(bool pressed) { btn_zl = pressed; }
311315

312316
/// Set the right trigger value
@@ -315,7 +319,7 @@ class SwitchProGamepadInputReport : public hid::report::base<hid::report::type::
315319
constexpr void set_right_trigger(float value) { set_trigger_axis(1, value); }
316320

317321
/// Set the right trigger value
318-
/// @param value The value to set the right trigger to.
322+
/// @param pressed Whether the right trigger is pressed or not
319323
constexpr void set_right_trigger(bool pressed) { btn_zr = pressed; }
320324

321325
/// Set the brake trigger value

components/i2c/include/i2c.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include <sdkconfig.h>
44

55
// Only include this header if the legacy API is selected
6-
#if defined(CONFIG_ESPP_I2C_USE_LEGACY_API) || defined(__DOXYGEN__)
6+
#if defined(CONFIG_ESPP_I2C_USE_LEGACY_API) || defined(_DOXYGEN_)
77

88
#include <mutex>
99
#include <vector>

0 commit comments

Comments
 (0)