Fixed namespace error with pmw examples.

driver/pwm3901
ZodiusInfuser 2021-09-13 22:15:06 +01:00
rodzic 27b74e140b
commit d08e790e9d
2 zmienionych plików z 28 dodań i 18 usunięć

Wyświetl plik

@ -2,17 +2,22 @@
#include "pico/stdlib.h"
#include <string>
// Uncomment the below line to switch from the PMW3901 to the PAA5100
//#define USE_PAA5100
#ifndef USE_PAA5100
#include "breakout_pmw3901.hpp"
#else
#include "breakout_paa5100.hpp"
#endif
using namespace pimoroni;
// Pick *one* sensor type by uncommenting the relevant lines below:
// PMW3901
#include "breakout_pmw3901.hpp"
typedef BreakoutPMW3901 FlowSensor;
// PAA5100
//include "breakout_paa5100.hpp"
//typedef BreakoutPAA5100 FlowSensor;
#ifndef USE_PAA5100
typedef BreakoutPMW3901 FlowSensor;
#else
typedef BreakoutPAA5100 FlowSensor;
#endif

Wyświetl plik

@ -1,17 +1,22 @@
#include <stdio.h>
#include "pico/stdlib.h"
// Uncomment the below line to switch from the PMW3901 to the PAA5100
//#define USE_PAA5100
#ifndef USE_PAA5100
#include "breakout_pmw3901.hpp"
#else
#include "breakout_paa5100.hpp"
#endif
using namespace pimoroni;
// Pick *one* sensor type by uncommenting the relevant lines below:
// PMW3901
#include "breakout_pmw3901.hpp"
typedef BreakoutPMW3901 FlowSensor;
// PAA5100
//include "breakout_paa5100.hpp"
//typedef BreakoutPAA5100 FlowSensor;
#ifndef USE_PAA5100
typedef BreakoutPMW3901 FlowSensor;
#else
typedef BreakoutPAA5100 FlowSensor;
#endif
FlowSensor flo(BG_SPI_FRONT);