Yo here you go kemal

Dependencies:   TCS3200

Committer:
xalec
Date:
Sat Dec 05 06:19:45 2020 +0000
Revision:
0:0dd4a69da379
CS 435

Who changed what in which revision?

UserRevisionLine numberNew contents of line
xalec 0:0dd4a69da379 1 #ifndef RGB_HANDLER_H
xalec 0:0dd4a69da379 2 #define RGB_HANDLER_H
xalec 0:0dd4a69da379 3
xalec 0:0dd4a69da379 4 namespace rgb_dws {
xalec 0:0dd4a69da379 5 struct RGB {
xalec 0:0dd4a69da379 6 //
xalec 0:0dd4a69da379 7 // Constructors
xalec 0:0dd4a69da379 8 RGB();
xalec 0:0dd4a69da379 9 RGB(short r, short g, short b);
xalec 0:0dd4a69da379 10 RGB(const RGB& c);
xalec 0:0dd4a69da379 11
xalec 0:0dd4a69da379 12 //
xalec 0:0dd4a69da379 13 // Methods
xalec 0:0dd4a69da379 14
xalec 0:0dd4a69da379 15 // A conversion method from input of the color sensor to accurate RGB value needed?
xalec 0:0dd4a69da379 16
xalec 0:0dd4a69da379 17 //
xalec 0:0dd4a69da379 18 // Fields
xalec 0:0dd4a69da379 19 short red, green, blue;
xalec 0:0dd4a69da379 20 };
xalec 0:0dd4a69da379 21
xalec 0:0dd4a69da379 22 // struct for calculations on RGB values (i.e mean, stand. dev., etc)
xalec 0:0dd4a69da379 23 struct RGBCalc {
xalec 0:0dd4a69da379 24 RGBCalc();
xalec 0:0dd4a69da379 25 RGBCalc(double r, double g, double b);
xalec 0:0dd4a69da379 26 RGBCalc(const RGBCalc& c);
xalec 0:0dd4a69da379 27
xalec 0:0dd4a69da379 28 double redC, greenC, blueC;
xalec 0:0dd4a69da379 29
xalec 0:0dd4a69da379 30 };
xalec 0:0dd4a69da379 31
xalec 0:0dd4a69da379 32 } // END OF NAMESPACE 'rgb_dws'
xalec 0:0dd4a69da379 33
xalec 0:0dd4a69da379 34 #endif