Skip to content

Commit

Permalink
serialconnect: Fix baudrate submenu
Browse files Browse the repository at this point in the history
* kBaudrates is an int not a char
* Just look at first kBaudrates member to figure out array size.
* Drop a few *extremely* uncommon speeds that you'll never see to
  shorten the list.
  • Loading branch information
kallisti5 committed Mar 30, 2015
1 parent e5d75a0 commit bc02619
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/apps/serialconnect/SerialWindow.cpp
Expand Up @@ -20,8 +20,8 @@
#include "TermView.h"


const int SerialWindow::kBaudrates[] = { 50, 75, 110, 134, 150, 200, 300, 600,
1200, 1800, 2400, 4800, 9600, 19200, 31250, 38400, 57600, 115200, 230400
const int SerialWindow::kBaudrates[] = { 75, 110, 300, 1200, 2400, 4800, 9600,
19200, 31250, 38400, 57600, 115200, 230400
};


Expand Down Expand Up @@ -159,7 +159,7 @@ SerialWindow::SerialWindow()
fStopbitsMenu->SetTargetForItems(be_app);

// Loop backwards to add fastest rates at top of menu
for (int i = sizeof(kBaudrates) / sizeof(char*); --i >= 0;)
for (int i = sizeof(kBaudrates) / sizeof(kBaudrates[0]); --i >= 0;)
{
message = new BMessage(kMsgSettings);
message->AddInt32("baudrate", kBaudrateConstants[i]);
Expand Down

0 comments on commit bc02619

Please sign in to comment.