Skip to content

Commit ee61ee6

Browse files
authored
Merge branch 'mega' into bugfix/GPS_resolution
2 parents ba09610 + b6b981d commit ee61ee6

File tree

197 files changed

+7219
-2446
lines changed

Some content is hidden

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

197 files changed

+7219
-2446
lines changed

docs/source/Plugin/P137.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Hardware outputs AXP192
6565

6666
* *LilyGO T-Beam* Settings for the LilyGO T-Beam series of GPS/LoRa devices with optional OLed display.
6767

68-
* *User defined* To be able to configure are available output pins the User defined option is available, f.e. when using a custom designed, or not yet supported, hardware setup.
68+
* *User defined* To be able to configure all available output pins the User defined option is available, f.e. when using a custom designed, or not yet supported, hardware setup.
6969

7070
When available, new predefined devices will be added. The User defined option will stay the last option.
7171

docs/source/Plugin/P139.rst

Lines changed: 198 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,198 @@
1+
.. include:: ../Plugin/_plugin_substitutions_p13x.repl
2+
.. _P139_page:
3+
4+
|P139_typename|
5+
==================================================
6+
7+
|P139_shortinfo|
8+
9+
Plugin details
10+
--------------
11+
12+
Type: |P139_type|
13+
14+
Name: |P139_name|
15+
16+
Status: |P139_status|
17+
18+
GitHub: |P139_github|_
19+
20+
Maintainer: |P139_maintainer|
21+
22+
Used libraries: |P139_usedlibraries|
23+
24+
Description
25+
-----------
26+
27+
I2C Power management controller. As found in some ESP32 models of M5Stack and TTGO.
28+
29+
Plugin is only available in ESP32 builds, as the library uses some software constructs that aren't available for ESP8266, and this controller is currently only found to be used with ESP32 boards.
30+
31+
Configuration
32+
--------------
33+
34+
.. image:: P139_DeviceConfiguration.png
35+
:alt: Device configuration
36+
37+
* **Name** A unique name should be entered here.
38+
39+
* **Enabled** The device can be disabled or enabled. When not enabled the device should not use any resources.
40+
41+
.. include:: PriorityTask.rst
42+
43+
I2C Options
44+
^^^^^^^^^^^^
45+
46+
The available settings here depend on the build used. At least the **Force Slow I2C speed** option is available, but selections for the I2C Multiplexer can also be shown. For details see the :ref:`Hardware_page`
47+
48+
Device Settings
49+
^^^^^^^^^^^^^^^^
50+
51+
* **Charge LED**: Select the working of the Charge LED (if that's available on your device). Available options:
52+
53+
.. image:: P139_ChargeLEDOptions.png
54+
55+
* *Off*: Do not turn the LED on during charging.
56+
57+
* *Flash 1Hz*: The LED will flash in a slow 1Hz tempo during charging.
58+
59+
* *Flash 4Hz*: The LED will flash in a somewhat faster 4Hz rate during charging.
60+
61+
* *Steady On*: The LED will be on during charging.
62+
63+
..
64+
65+
* **Generate events**: Generate events when the charging state changes. There are 2 event values for this event: ``<taskname>#ChargingState=<NewState>,<OldState>``.
66+
67+
Hardware ports AXP2101
68+
^^^^^^^^^^^^^^^^^^^^^^
69+
70+
* **Predefined device configuration** The plugin provides presets for some specific devices:
71+
72+
.. image:: P139_PredefinedDeviceOptions.png
73+
74+
* *Select an option to set default values*: This option will always be selected when opening the page.
75+
76+
* *M5Stack Core2 v1.1*: Settings for the M5Stack Core2 v1.1, and some derived special models, hardware (not for v1.0 hardware).
77+
78+
* *M5Stack Core S3*: Settings for the M5Stack S3 hardware.
79+
80+
* *LilyGO T-Beam v1.2*: Settings for the LilyGO T-Beam v1.2 series of GPS/LoRa devices with optional OLed display (not for v1.0 or v1.1 models).
81+
82+
* *LilyGO T-Beam S3 v3*: Settings for the LilyGO T-Beam S3 v3 series hardware.
83+
84+
* *LilyGO T-Pcie v1.2*: Settings for the LilyGO T-Pcie v1.2 series hardware.
85+
86+
* *User defined*: To be able to configure all available ports the User defined option is added, f.e. when using a custom designed, or not yet supported, hardware setup.
87+
88+
When available, new predefined devices will be added. The User defined option will stay the last option.
89+
90+
Depending on the selected configuration, the ports of the AXP2101 can be set at a predefined value. When setting a value below the minimum value (shown next to the voltage selector), the port will be turned off. Above the maximum voltage is not supported/allowed. Stepsize/resolution depends on the port, and can be found in the technical documentation of the AXP2101.
91+
92+
.. warning:: Check board documentation for what each port is actually connected to, and the allowed voltage range for that port.
93+
94+
For the available ports, the initial state can be selected. The available options are:
95+
96+
.. image:: P139_InitialStateOptions.png
97+
98+
* *Off*: Sets the state to off level (0 V).
99+
100+
* *On*: Sets the state to on (high) level.
101+
102+
* *Default*: Doesn't set the state of the port.
103+
104+
If the column shows ``[Protected]`` or ``[Disabled]``, that port is not available for use in the current configuration or in the commands (see below).
105+
106+
Output Configuration
107+
^^^^^^^^^^^^^^^^^^^^
108+
109+
* **Number Output Values**: Select the number of values that have to be available. The default is set to *Quad*, as there are far more than 4 values available for display.
110+
111+
Available options: *Single* (1), *Dual* (2), *Triple* (3) and *Quad* (4).
112+
113+
* **Value 1..4**: Select the desired value to be available in the Values fields. The name of the Values will be set to a matching default automatically, but can be changed afterward.
114+
115+
.. image:: P139_ValueOptions.png
116+
117+
.. image:: P139_ValueOptionsB.png
118+
119+
Available options:
120+
121+
* *None*: To leave the value empty/0.00
122+
123+
* *DCDC1* .. *CPULDOS*: The voltage of the port.
124+
125+
* *ChargeLed*: The state of the Charge LED, 0 = Off, 1 = Flash 1Hz, 2 = Flash 4Hz, 3 = Steady On.
126+
127+
* *BatCharge*: The charge state percentage of the battery.
128+
129+
* *ChargingState*: The state of charging, -1 = discharging, 0 = standby, 1 = charging.
130+
131+
* *BatPresent*: Is a battery present (1) or disconnected (0).
132+
133+
* *ChipID*: The ID set in the chip, 0 = not found, 71 = AXP2101.
134+
135+
* *ChargingDetail*: The detailed state of charging.
136+
137+
* 0: ``tri-charge``
138+
* 1: ``pre-charge``
139+
* 2: ``constant charge (CC)``
140+
* 3: ``constant voltage (CV)``
141+
* 4: ``charge done``
142+
* 5: ``not charging``
143+
144+
* *BatVoltage*: The battery voltage.
145+
146+
* *BatTemp*: The temperature of the battery, (if a battery-temperature sensor is installed).
147+
148+
* *BusVoltage*: The bus-voltage.
149+
150+
* *SysVoltage*: The system-voltage.
151+
152+
* *ChipTemp*: The internal temperature of the chip.
153+
154+
155+
.. note:: Not all options hold usable values for all boards, some may even be not connected. Check the board documentation for available values.
156+
157+
Data Acquisition
158+
^^^^^^^^^^^^^^^^
159+
160+
This group of settings, **Single event with all values**, **Send to Controller** and **Interval** settings are standard available configuration items. Send to Controller is only visible when one or more Controllers are configured.
161+
162+
* **Interval** By default, Interval will be set to 0 sec. as it is optional. When set > 0 it is the frequency used to read sensor values and send these to any Controllers configured for this device.
163+
164+
Values
165+
^^^^^^
166+
167+
The measured values are available in variables, where the initial names are determined by the selected **Value 1..4** settings. A formula can be set to recalculate. The number of decimals can be set as desired, and defaults to 2.
168+
169+
In selected builds, per Value **Stats** options are available, that when enabled, will gather the measured data and present most recent data in a graph, as described here: :ref:`Task Value Statistics: <Task Value Statistics>`
170+
171+
Commands
172+
~~~~~~~~
173+
174+
.. include:: P139_commands.repl
175+
176+
177+
Extra values
178+
~~~~~~~~~~~~
179+
180+
As this plugin has more values available than can be set in the regular Values fields, all values are also available from the Get Config feature.
181+
182+
.. include:: P139_values.repl
183+
184+
185+
Extra events
186+
~~~~~~~~~~~~
187+
188+
Besides the regular events, of ``<taskname>#<valuename>=<value>`` or ``<taskname>#All=<value1>,..<valueN>`` when the **Interval** is set, there can be an extra event generated:
189+
190+
.. include:: P139_events.repl
191+
192+
193+
Change log
194+
----------
195+
196+
.. versionchanged:: 2.0
197+
198+
|added| 2025-01-19 Initially added.
31.3 KB
Loading
119 KB
Loading
5.61 KB
Loading
26.3 KB
Loading
84.2 KB
Loading
28.7 KB
Loading
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
.. csv-table::
2+
:header: "Command Syntax", "Extra information"
3+
:widths: 20, 30
4+
5+
"
6+
| Commands to control the AXP2101 port voltages & states.
7+
","
8+
| **Attention**: Commands will fail if the selected port is 'Protected' or 'Disabled' according to the selected Predefined device configuration.
9+
"
10+
"
11+
| ``axp,readchip``
12+
13+
","
14+
| List the current values as configured in the chip. The logging level must be set to ``INFO``. This data can be used to configure additional predefined devices.
15+
"
16+
"
17+
| ``axp,voltage,<port>,<voltage>``
18+
19+
| ``port`` one of the available ports.
20+
| ``voltage`` range: 0..<max_port_voltage> mV.
21+
","
22+
| Set selected port to the specified voltage. When set to 0 mV the port will be turned off.
23+
| Ports of the AXP2101: ``DCDC1`` .. ``DCDC4``, ``ALDO1`` .. ``ALDO4``, ``BLDO1``, ``BLDO2``, ``DLDO1``, ``DLDO2`` or ``CPULDOS``.
24+
25+
| The max port voltage depends on the selected port, and is available in the technical documentation of the AXP2101.
26+
"
27+
"
28+
| ``axp,on,<port>``
29+
30+
| ``port`` one of the available ports.
31+
","
32+
| Set the selected AXP2101 port ON.
33+
| Ports of the AXP2101: ``DCDC1`` .. ``DCDC4``, ``ALDO1`` .. ``ALDO4``, ``BLDO1``, ``BLDO2``, ``DLDO1``, ``DLDO2`` or ``CPULDOS``.
34+
"
35+
"
36+
| ``axp,off,<port>``
37+
38+
| ``port`` one of the available ports.
39+
","
40+
| Set the selected AXP2101 port OFF.
41+
| Ports of the AXP2101: ``DCDC1`` .. ``DCDC4``, ``ALDO1`` .. ``ALDO4``, ``BLDO1``, ``BLDO2``, ``DLDO1``, ``DLDO2`` or ``CPULDOS``.
42+
"
43+
"
44+
| ``axp,percentage,<port>,<percentage>``
45+
46+
| ``port`` one of the available Ports.
47+
| ``percentage``: 0 (off/low) or 1..100%
48+
","
49+
| Set the selected port to Off for 0%, or On in range <min_range>..<max_range> for 1..100%.
50+
| Ports of the AXP2101: ``DCDC1`` .. ``DCDC4``, ``ALDO1`` .. ``ALDO4``, ``BLDO1``, ``BLDO2``, ``DLDO1``, ``DLDO2`` or ``CPULDOS``.
51+
52+
| The min and max port voltages depend on the selected port, and are available in the technical documentation of the AXP2101.
53+
"
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.. csv-table::
2+
:header: "Event", "Extra information"
3+
:widths: 20, 30
4+
5+
"
6+
| ``<taskname>#ChargingState=<old_state>,<new_state>``
7+
8+
| ``new_state`` / ``old_state``: ``-1`` (Discharging), ``0`` (Standby) or ``1`` (Charging).
9+
10+
","
11+
| Event generated when the **Generate events** checkbox is enabled.
12+
"

0 commit comments

Comments
 (0)