Exemplo n.º 1
0
/*
* It is not possible to create a structure including bitfield parameters
* thus erlang quick check method will ssend all generated fields to this function
* and this test function generate propper struct to be send to the examineID function.
*/
int test(int id,int increase,int panic,int left,int right,int front,int rear){
	msg* m=(msg*)malloc(sizeof(msg));
	m->id=id;
	m->increase=increase;
	m->panic=panic;
	m->left=left;
	m->right=right;
	m->front=front;
	m->rear=rear;
	return examineID(m);
}
Exemplo n.º 2
0
Arquivo: parser.c Projeto: Rahwa/moto
main(void){
  int x = 5;
  
  while(x != 0){
  msg binary = scanHexMsgSTDIN();
  msg_pointer mp;
  mp = &binary;

  /* mp->ID = CONTROL; */
  /* binary.increase = 0; */
  /* binary.front = 1; */
  /* binary.rear = 1; */
  
  examineID(mp);
  printMsg(mp);
  printMotorStatus();
  x--;
  }
  return 0;

}