Skip to content

Commit

Permalink
Updated library to resolve compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
milador committed Apr 9, 2022
1 parent c57b3ea commit 2fbb654
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 deletions.
4 changes: 2 additions & 2 deletions library.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name=EasyMorse
version=1.1.0
version=1.2.0
author=Milador
maintainer=Milador <[email protected]>
maintainer=Milador <[email protected]>
sentence=A simplified Morse code library to be used as a method of Communication.
paragraph=You can use this library along example codes and two switches to get started converting Morse code to character.
category=Communication
Expand Down
13 changes: 3 additions & 10 deletions src/EasyMorse.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//EasyMorse Library
//EasyMorse.cpp
//Written by: Milad Hajihassan
//Version 1.0 (13/1/2019)
//Version 1.2 (08/4/2022)
//Based on : https://github.com/morse2go/morse2go

/*
Expand Down Expand Up @@ -160,10 +160,9 @@ void EasyMorse::pop() {
//Get number value of character. Example: .- = 12
long EasyMorse::getCharNum() {
int mult = 1;
int i;
long charNum = 0;

for (i = pointer-1; i > -1; i--) {
for (int i = pointer-1; i > -1; i--) {
charNum = charNum + (dotDash[i] * mult);
mult = mult * 10;
}
Expand All @@ -172,9 +171,7 @@ long EasyMorse::getCharNum() {

//Get the resulting character
char EasyMorse::getChar() {
int mult = 1;
int j;
char charOut;
char charOut = '\0';
long charNum = getCharNum();

//Search for character based on character number
Expand All @@ -190,8 +187,6 @@ char EasyMorse::getChar() {

//Get the resulting Ascii code
int EasyMorse::getCharAscii() {
int mult = 1;
int j;
int asciiOut = 0;
long charNum = getCharNum();
//Search for Ascii code based on character number
Expand All @@ -207,8 +202,6 @@ int EasyMorse::getCharAscii() {

//Get the resulting mouse action
int* EasyMorse::getMouse() {
int mult = 1;
int j;
static int mouseAction[4];
mouseAction[0]= 0;
mouseAction[1]= 0;
Expand Down
2 changes: 1 addition & 1 deletion src/EasyMorse.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//EasyMorse Library
//EasyMorse.h
//Written by: Milad Hajihassan
//Version 1.0 (13/1/2019)
//Version 1.2 (08/4/2022)
//Based on : https://github.com/morse2go/morse2go

/*
Expand Down

0 comments on commit 2fbb654

Please sign in to comment.