What Am I Not Seeing Here....
a simple skeleton of program, yet gives bizarre errors on compile:
if change type of argument testcable other t_cablenode, well....
note error flags weird:
"pdbcabletester.ino:7:16: error: variable or field 'testcable' declared void"
variable or field??? why not recognize function?
this compiled mega, no problems memory.
regards,
ray l.
code: [select]
/*--------------------------------------------------------------------------------------
includes
--------------------------------------------------------------------------------------*/
#include <arduino.h>
/*--------------------------------------------------------------------------------------
defines
--------------------------------------------------------------------------------------*/
// wire node descriptor
typedef struct
{
char *signal;
char *conn;
int connpin;
char *color;
uint8_t iopin;
} t_cablenode;
/****************************************************************************************
* start of data
***************************************************************************************/
t_cablenode pdbrevecable[] =
{
// 8-pin pdb connector
{ "gnd3", "pdb8", 1, "black", a0 },
{ "vcc", "pdb8", 2, "red", a1 },
{ "gnd4", "pdb8", 3, "gray", a2 },
{ "ena", "pdb8", 4, "blue", a3 },
{ "fwd", "pdb8", 5, "yellow", a4 },
{ "jog", "pdb8", 6, "orange", a5 },
{ "lsense", "pdb8", 7, "purple", a6 },
{ "probe", "pdb8", 8, "brown", a7 },
// 2-pin pcb e-stop connector
{ "estop", "pdb2", 1, "green", a8 },
{ "gnd2", "pdb2", 2, "white", a9 },
// 6-pin bob vfd connector
{ "gnd1", "bob6", 1, "black", 0 },
{ "vc", "bob6", 2, "red", 1 },
{ "gnd2", "bob6", 3, "white", 2 },
{ "ena", "bob6", 4, "blue", 3 },
{ "estop", "bob6", 5, "green", 4 },
{ "rev", "bob6", 6, "white", 5 },
// 4-pin bob pdb connector
{ "gnd3", "bob4", 1, "black", 6 },
{ "probe", "bob4", 2, "brown", 7 },
{ "vcc", "bob4", 4, "red", 8 },
// 3-wire bob vfd harness
{ "rev", "bobvfd", 1, "white", 14 },
{ "vc", "bobvfd", 2, "red", 15 },
{ "gnd1", "bobvfd", 3, "black", 16 },
// 4-wire pdb vfd harness
{ "lsense", "pdbvfd", 1, "brown", 18 },
{ "fwd", "pdbvfd", 2, "yellow", 19 },
{ "jog", "pdbvfd", 3, "orange", 20 },
{ "gnd4", "pdbvfd", 4, "black", 21 },
{ null, null, 0, null, 0 }
};
void testcable(t_cablenode *p)
{
}
void setup()
{
}
void loop()
{
}
if change type of argument testcable other t_cablenode, well....
note error flags weird:
"pdbcabletester.ino:7:16: error: variable or field 'testcable' declared void"
variable or field??? why not recognize function?
this compiled mega, no problems memory.
regards,
ray l.
the ide adds prototype each function @ top of code before typedef. there workaround problem can't remember is!. try moving typedef first line above #define.
mark
mark
Arduino Forum > Using Arduino > Programming Questions > What Am I Not Seeing Here....
arduino
Comments
Post a Comment