credentials: clean up a define in main.c

This commit is contained in:
A.M. Rowsell 2026-06-30 06:47:32 -04:00
commit 9c389117c4
Signed by: amr
GPG key ID: E0879EDBDB0CA7B1

View file

@ -18,9 +18,9 @@
* the readings to Adafruit IO over MQTT using the Pico W. * the readings to Adafruit IO over MQTT using the Pico W.
******************************************************************************/ ******************************************************************************/
#include "credentials.h"
#include "aht.h" #include "aht.h"
#include "bmp.h" #include "bmp.h"
#include "credentials.h"
#include "ens.h" #include "ens.h"
#include "hardware/gpio.h" #include "hardware/gpio.h"
#include "hardware/i2c.h" #include "hardware/i2c.h"
@ -39,7 +39,6 @@
#define I2C1_SDA_PIN 18 #define I2C1_SDA_PIN 18
// MQTT and WiFi defines // MQTT and WiFi defines
#define ADAFRUIT_IO_HOST "io.adafruit.com" #define ADAFRUIT_IO_HOST "io.adafruit.com"
#define ADAFRUIT_IO_PASSWORD ADAFRUIT_IO_KEY
#define MQTT_KEEP_ALIVE_SECONDS 60 #define MQTT_KEEP_ALIVE_SECONDS 60
static void mqtt_connection_cb(mqtt_client_t *client, void *arg, static void mqtt_connection_cb(mqtt_client_t *client, void *arg,
@ -78,7 +77,8 @@ int main(void) {
// MQTT Topics // MQTT Topics
static const char temp_topic[] = static const char temp_topic[] =
ADAFRUIT_IO_USERNAME "/feeds/ensaht.temperature"; ADAFRUIT_IO_USERNAME "/feeds/ensaht.temperature";
static const char humi_topic[] = ADAFRUIT_IO_USERNAME "/feeds/ensaht.humidity"; static const char humi_topic[] =
ADAFRUIT_IO_USERNAME "/feeds/ensaht.humidity";
static const char aqi_topic[] = ADAFRUIT_IO_USERNAME "/feeds/ensaht.aqi"; static const char aqi_topic[] = ADAFRUIT_IO_USERNAME "/feeds/ensaht.aqi";
static const char tvoc_topic[] = ADAFRUIT_IO_USERNAME "/feeds/ensaht.tvoc"; static const char tvoc_topic[] = ADAFRUIT_IO_USERNAME "/feeds/ensaht.tvoc";
static const char etoh_topic[] = ADAFRUIT_IO_USERNAME "/feeds/ensaht.etoh"; static const char etoh_topic[] = ADAFRUIT_IO_USERNAME "/feeds/ensaht.etoh";
@ -99,7 +99,7 @@ int main(void) {
struct mqtt_connect_client_info_t mqtt_client_info = { struct mqtt_connect_client_info_t mqtt_client_info = {
.client_id = ADAFRUIT_IO_USERNAME, .client_id = ADAFRUIT_IO_USERNAME,
.client_user = ADAFRUIT_IO_USERNAME, .client_user = ADAFRUIT_IO_USERNAME,
.client_pass = ADAFRUIT_IO_PASSWORD, .client_pass = ADAFRUIT_IO_KEY,
.keep_alive = MQTT_KEEP_ALIVE_SECONDS, .keep_alive = MQTT_KEEP_ALIVE_SECONDS,
}; };
// setup stdio // setup stdio