Bläddra i källkod

header updated && little bug fix

lechercheur123 9 år sedan
förälder
incheckning
cdcddf652f
2 ändrade filer med 7 tillägg och 5 borttagningar
  1. 2 2
      Minitel.cpp
  2. 5 3
      Minitel.h

+ 2 - 2
Minitel.cpp

@@ -27,7 +27,7 @@ boolean _currentShowCursor = false;
 
 
 Minitel::Minitel() : SoftwareSerial(6, 7) {
-  init(4800);
+  init((short)(4800));
 }
 
 Minitel::Minitel(short speed) : SoftwareSerial(6, 7) {
@@ -35,7 +35,7 @@ Minitel::Minitel(short speed) : SoftwareSerial(6, 7) {
 }
 
 Minitel::Minitel(int rx, int tx) : SoftwareSerial(rx, tx) {
-  init(4800);
+  init((short)(4800));
 }
 
 Minitel::Minitel(int rx, int tx, short speed) : SoftwareSerial(rx, tx) {

+ 5 - 3
Minitel.h

@@ -179,7 +179,7 @@ private :
 	
 	char _nullChar = '~';
 
-	void init();
+	void init(short speed);
 	void mode(byte mode);
 	void cursor(boolean b);
 	void blink(boolean b);
@@ -203,6 +203,8 @@ public :
 
 	Minitel();
 	Minitel(int rx, int tx);
+	Minitel(short speed);
+	Minitel(int rx, int tx, short speed);
 
 	void serialprint7(byte b);
 
@@ -258,7 +260,7 @@ public :
 	void invertVideo();
 	void transparentVideo();
 	
-	void setMaxSpeed();
+	void setSpeed(short speed);
 	
 	void bip(unsigned long duration);
 
@@ -286,4 +288,4 @@ public :
 
 };
 
-#endif
+#endif