Colour binning for Nespresso capsules using rgb_sensor (RGB LED & Photo Diode) - to detect flavour based on colour
Dependencies: rgb_sensor_buffer
Dependents: coffee_capsule_detection
Diff: detection.h
- Revision:
- 3:4eefc032a319
- Parent:
- 1:a6c13143b151
--- a/detection.h Thu Jul 03 09:37:45 2014 +0000 +++ b/detection.h Fri Jul 11 13:48:32 2014 +0000 @@ -1,9 +1,9 @@ #ifndef __DETECTION_H_ #define __DETECTION_H__ -#include <rgb_sensor.h> +#include <rgb_sensor_buffer.h> -#define DETECTION_VALUES (15) +#define RGB_VALUES (50) struct Capsule { const char* name; @@ -21,17 +21,15 @@ int match_sample_to_capsule(TRGB& rgb_sample); const Capsule *read_capsule(void); - RGB_Sensor m_rgb; + RGB_SensorBuffer m_rgb; Capsule const *m_last_capsule; - uint32_t m_buffer_pos; - TRGB m_buffer[DETECTION_VALUES]; + TRGB m_buffer[RGB_VALUES]; - private: - static bool __callback(const TRGB &color); - bool callback(const TRGB &color); - static RGB_Detection *m_global; +// private: +// static bool __callback(const TRGB &color); +// bool callback(const TRGB &color); +// static RGB_Detection *m_global; }; -const char* do_detection(); #endif // __DETECTION_H__