Skip to content

Implementation of AOX3000 oxygen sensor#24510

Open
SvenArke wants to merge 1 commit intoarendst:developmentfrom
SvenArke:development
Open

Implementation of AOX3000 oxygen sensor#24510
SvenArke wants to merge 1 commit intoarendst:developmentfrom
SvenArke:development

Conversation

@SvenArke
Copy link

Description:

Implementation of AOX3000 oxygen sensor.

https://robu.in/wp-content/uploads/2023/01/20250417142952388.pdf

Checklist:

  • [ X] The pull request is done against the latest development branch
  • [ X] Only relevant files were touched
  • [ X] Only one feature/fix was added per PR and the code change compiles without warnings
  • [ -] The code change is tested and works with Tasmota core ESP8266 V.2.7.8
  • [ X] The code change is tested and works with Tasmota core ESP32 V.3.1.10
  • [ X] I accept the CLA.
grafik

Deine Commit-Nachricht

Deine Commit-Nachricht

Deine Commit-Nachricht

Deine Commit-Nachricht

Deine Commit-Nachricht

Remove language.rar
Copy link
Collaborator

@s-hadinger s-hadinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, please make a few changes

GPIO_TELEINFO_ENABLE, // Teleinfo Enable Receive Pin
GPIO_LMT01, // LMT01 input counting pin
GPIO_IEM3000_TX, GPIO_IEM3000_RX, // IEM3000 Serial interface
GPIO_AOX_RX, GPIO_AOX_TX, // AOX3000Z01 UART interface
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can't insert a new GPIO here or it will break the numbers for all following GPIOs and break configuration for all Tasmota devices

int Aox_reinit_count = 0;

// Frame parser state
uint8_t Aox_buf[32];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you really need to permanently use RAM for this? Or could you move it to local variables so it is allocated on the stack?

Comment on lines +50 to +56
float Aox_oxygen = NAN;
uint8_t Aox_status = 0;
uint32_t Aox_last_valid = 0;
bool Aox_ready = false;
int8_t Aox_rx_pin = -1;
uint32_t Aox_last_data = 0;
int Aox_reinit_count = 0;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please put all this in a struct so it's cleaner and allows to compact memory.

Comment on lines +192 to +194
const char *status_str = (Aox_status == 0x01) ? "Error" :
(Aox_status == 0x02) ? "Warmup" :
(Aox_status == 0x03) ? "Normal" : "Unknown";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to encapsulate the string literals in PSTR() for ESP8266 or they are allocated in the main memory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants