Move argc/argv processing deeper into simulator.
Less magic == more better.
This commit is contained in:
parent
452e2e5cd9
commit
b65efe9b03
5
mendel.c
5
mendel.c
|
|
@ -232,12 +232,9 @@ void init(void) {
|
|||
///
|
||||
/// just run init(), then run an endless loop where we pass characters from the serial RX buffer to gcode_parse_char() and check the clocks
|
||||
#ifdef SIMULATOR
|
||||
int g_argc;
|
||||
char** g_argv;
|
||||
int main (int argc, char** argv)
|
||||
{
|
||||
g_argc = argc;
|
||||
g_argv = argv;
|
||||
sim_start(argc, argv);
|
||||
#else
|
||||
int main (void)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -27,6 +27,15 @@ volatile uint8_t
|
|||
DIO3_WPORT,
|
||||
DIO4_WPORT;
|
||||
|
||||
int g_argc;
|
||||
char** g_argv;
|
||||
void sim_start(int argc, char** argv) {
|
||||
// TODO: Parse args here and open the serial port instead of saving them
|
||||
// for serial_init.
|
||||
// Save these for the serial_init code
|
||||
g_argc = argc;
|
||||
g_argv = argv;
|
||||
}
|
||||
|
||||
/* -- debugging ------------------------------------------------------------ */
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue