[SOLVED] Trouble with creating a custom deck
Posted: Tue Jul 04, 2017 11:17 am
I have been trying to create custom deck on my Crazyflie 2.0 that will for now set pin IO1 to high. I have tried following these tutorials:
https://wiki.bitcraze.io/doc:crazyflie: ... deck:howto
https://wiki.bitcraze.io/doc:crazyflie: ... ration_api
But I cant seem to get even the most basic deck working. The drivers shows up in console upon connecting to the crazyflie python client but the initialization function and test function don't print to console like in the tutorial.
Below is my deck code:
My Makefile looks like this (only relevant code)
My crazyflie firmware did not have a config.mk so I made a new file called config.mk and below is what I put in it. I have also tried with DEBUG=1 but that did not help.
I then run Make CLOUD followed by FLash using radio
So have I done anything wrong? Any pointers would be much appreciated
https://wiki.bitcraze.io/doc:crazyflie: ... deck:howto
https://wiki.bitcraze.io/doc:crazyflie: ... ration_api
But I cant seem to get even the most basic deck working. The drivers shows up in console upon connecting to the crazyflie python client but the initialization function and test function don't print to console like in the tutorial.
Below is my deck code:
Code: Select all
#define DEBUG_MODULE "TESTDECK"
#include <stdint.h>
#include <stdlib.h>
#include "stm32fxxx.h"
#include "log.h"
#include "debug.h"
#include "deck.h"
static float TEST = 1;
static void testInit(DeckInfo *info)
{
DEBUG_PRINT("THIS IS A TEST PRINT!\n");
TEST++;
pinMode(DECK_GPIO_IO1, OUTPUT);
digitalWrite(DECK_GPIO_IO1, HIGH);
}
static bool testTest(){
DEBUG_PRINT("TEST PASSED\n");
return true;
}
static const DeckDriver test_deck = {
.name = "testmeow",
.vid = 0,
.pid = 0,
.usedGpio = DECK_USING_IO_1,
.init = testInit,
.test = testTest,
};
DECK_DRIVER(test_deck);
//test logigng
LOG_GROUP_START(test)
LOG_ADD(LOG_FLOAT, TESTVARIABLE, &TEST)
LOG_GROUP_STOP(test)
Code: Select all
# Decks
PROJ_OBJ_CF2 += bigquad.o
PROJ_OBJ_CF2 += rzr.o
PROJ_OBJ_CF2 += ledring12.o
PROJ_OBJ_CF2 += buzzdeck.o
PROJ_OBJ_CF2 += gtgps.o
PROJ_OBJ_CF2 += cppmdeck.o
PROJ_OBJ_CF2 += usddeck.o
PROJ_OBJ_CF2 += vl53l0x.o
PROJ_OBJ_CF2 += locodeck.o
PROJ_OBJ_CF2 += test2.o
My crazyflie firmware did not have a config.mk so I made a new file called config.mk and below is what I put in it. I have also tried with DEBUG=1 but that did not help.
Code: Select all
CFlAGS += -DDECK_FORCE=testmeow
So have I done anything wrong? Any pointers would be much appreciated
