Skip to content

Software #159

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 51 commits into
base: master
Choose a base branch
from
Open

Software #159

wants to merge 51 commits into from

Conversation

ramshak99
Copy link
Collaborator

No description provided.

@ramshak99 ramshak99 requested a review from stephen99scott April 4, 2022 22:56
Comment on lines 59 to 62
public static BleDevice SignBuddy;
public static ReentrantLock samplesLock = new ReentrantLock();
public static List<SignBuddyProto.SBPSample> samples = new ArrayList<>();
public static ByteArrayOutputStream byteBuffer = new ByteArrayOutputStream();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leave these as private and just redefine them in the other activity

Comment on lines 95 to 98
public void onFinish() {
countText.setText("GO!");
BleManager.getInstance().notify(MainActivity.SignBuddy, UUID_SERVICE, UUID_CHARACTERISTIC_NOTIFY, new BleNotifyCallback() {
@Override
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Notify should be called before this somewhere. This is where you actually need to send the command to the device to record the data, and so the app should already be waiting to be notified

}
}
});
countText.setText(gestureData.toString());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will get called right away like this and so this string will likely be empty

overridePendingTransition(0, 0);
}
else {
Toast.makeText(LessonActivity.this, "Incorrect, Please try again!", Toast.LENGTH_SHORT).show();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think toast is mostly used for debug info, I think these important messages should be displayed as text in the activity screen

String data19 = String.valueOf((gestureData.getSamples(0).getTouchData().getTouch8() ? 1 : -1)/12.64911);
String data20 = String.valueOf((gestureData.getSamples(0).getTouchData().getTouch9() ? 1 : -1)/12.64911);
String[] args = {data0, data1, data2, data3, data4, data5, data6, data7, data8, data9, data10, data11, data12, data13, data14, data15, data16, data17, data18, data19, data20};
SVCalpha = SVC.main(args)+1;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the +1 is necessary

Comment on lines 220 to 232
private boolean checkCorrect() {

if (alphanum<=9){
correct = (alphanum==SVCalpha);
}
//skip j
if (alphanum<26 && alphanum>10){
correct = (alphanum==SVCalpha-1);
}
if (alphanum==10 || alphanum ==26) {
correct = true;//skip this letter
}
return correct;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is kind of confusing, can you just define an enum for all of the letters

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants