serialconnect: Fix baudrate submenu
* 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.
This commit is contained in:
parent
e5d75a0920
commit
bc02619755
@ -20,8 +20,8 @@
|
|||||||
#include "TermView.h"
|
#include "TermView.h"
|
||||||
|
|
||||||
|
|
||||||
const int SerialWindow::kBaudrates[] = { 50, 75, 110, 134, 150, 200, 300, 600,
|
const int SerialWindow::kBaudrates[] = { 75, 110, 300, 1200, 2400, 4800, 9600,
|
||||||
1200, 1800, 2400, 4800, 9600, 19200, 31250, 38400, 57600, 115200, 230400
|
19200, 31250, 38400, 57600, 115200, 230400
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -159,7 +159,7 @@ SerialWindow::SerialWindow()
|
|||||||
fStopbitsMenu->SetTargetForItems(be_app);
|
fStopbitsMenu->SetTargetForItems(be_app);
|
||||||
|
|
||||||
// Loop backwards to add fastest rates at top of menu
|
// 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 = new BMessage(kMsgSettings);
|
||||||
message->AddInt32("baudrate", kBaudrateConstants[i]);
|
message->AddInt32("baudrate", kBaudrateConstants[i]);
|
||||||
|
Loading…
Reference in New Issue
Block a user