Deck can't be detected.
Posted: Tue Jun 18, 2019 6:45 pm
Good evening everyone!
I wrote a very basic driver for my deck I want to attach on top of the Crazyflie. It consists IR thermometer MLX90614 connected with I2C bus.
So basically I just want it to be seen in PC Crazyflie client, so I add it to deck parameters group in the end via params.h. It compiles well, I also force initialize it in config.mk with DEBUG = 1, but Crazyflie client log shows that the only deck detected is bcFlow2 (it is also onboard).
Client also shows that deck was added in parameters, but its value is 0 (meaning it's not detected?). What else should I do so my deck could be detected?
I wrote a very basic driver for my deck I want to attach on top of the Crazyflie. It consists IR thermometer MLX90614 connected with I2C bus.
Code: Select all
/*
* pyrometer.c
*
* Created on: Jun 18, 2019
* Author: bitcraze
*/
#include "deck.h"
#include "debug.h"
#include "param.h"
#define DEBUG_MODULE "PD"
static bool isInit = false;
static void PyroDriverInit()
{
DEBUG_PRINT("PyroDeck Driver initialized!\n");
isInit = true;
}
static bool PyroDriverTest()
{
DEBUG_PRINT("PyroDeck's Driver test passed!\n");
return true;
}
static const DeckDriver PyroDriver = {
.vid = 0xBC,
.pid = 0x5A,
.name = "MLX90614",
.usedGpio = DECK_USING_SDA | DECK_USING_SCL,
.init = PyroDriverInit,
.test = PyroDriverTest,
};
DECK_DRIVER(PyroDriver);
PARAM_GROUP_START(deck)
PARAM_ADD(PARAM_UINT8 | PARAM_RONLY, PyroDeck, &isInit)
PARAM_GROUP_STOP(deck)
Code: Select all
SYS: Crazyflie 2.0 is up and running!
SYS: Build 69:00e0fcf022c4 (2019.02 +69) MODIFIED
SYS: I am 0x2035355237485008001C0044 and I have 1024KB of flash!
CFGBLK: v1, verification [OK]
DECK_DRIVERS: Found 16 drivers
DECK_DRIVERS: VID:PID 00:00 (bcRZR)
DECK_DRIVERS: VID:PID BC:01 (bcLedRing)
DECK_DRIVERS: VID:PID BC:04 (bcBuzzer)
DECK_DRIVERS: VID:PID BC:07 (bcGTGPS)
DECK_DRIVERS: VID:PID 00:00 (bcCPPM)
DECK_DRIVERS: VID:PID BC:08 (bcUSD)
DECK_DRIVERS: VID:PID BC:09 (bcZRanger)
DECK_DRIVERS: VID:PID BC:0E (bcZRanger2)
DECK_DRIVERS: VID:PID BC:06 (bcDWM1000)
DECK_DRIVERS: VID:PID BC:0A (bcFlow)
DECK_DRIVERS: VID:PID BC:0F (bcFlow2)
DECK_DRIVERS: VID:PID BC:0B (bcOA)
DECK_DRIVERS: VID:PID BC:0C (bcMultiranger)
DECK_DRIVERS: VID:PID BC:5A (MLX90614)
DECK_DRIVERS: VID:PID BC:FF (bcExpTest)
DECK_DRIVERS: VID:PID BC:FE (bcExpTestRR)
DECK_INFO: Found 1 deck memory.
DECK_INFO: Enumerating deck 0
DECK_INFO: Deck BC:0F bcFlow2 (Rev. A)
DECK_INFO: Used pin: 0000000C
DECK_INFO: Driver implements: [ init test ]
DECK_CORE: 1 deck(s) found
DECK_CORE: Calling INIT on driver bcFlow2 for deck 0
ZR2: Z-down sensor [OK]
PMW: Motion chip id: 0x49:0xB6
MPU9250 I2C connection [OK].
AK8963 I2C connection [OK].
LPS25H I2C connection [OK].
ESTIMATOR: Using Kalman (2) estimator
CONTROLLER: Using PID (1) controller
EEPROM: I2C connection [OK].
AK8963: Self test [OK].
DECK_CORE: Deck 0 test [OK].
STAB: Wait for sensor calibration...
SYS: Free heap: 8864 bytes
STAB: Ready to fly.