/*
 * Class:     cbccore_low_Create
 * Method:    create_bumpdrop
 * Signature: ()I
 */
JNIEXPORT jint JNICALL Java_cbccore_low_Create_create_1bumpdrop(JNIEnv *env, jobject obj)
{
#ifdef CBC
    return create_bumpdrop();
#else
    printf("Java_cbccore_low_Create_create_1bumpdrop stub\n");
    return -1;
#endif
}
void FORTE_iCreateBumper::executeEvent(int pa_nEIID){
  switch (pa_nEIID){
    case scm_nEventREQID:
      create_bumpdrop();
      LtBump() = gc_lbump;
      RtBump() = gc_rbump;
      sendOutputEvent(scm_nEventCNFID);
      break;
  }
}
void FORTE_iCreateWheels::executeEvent(int pa_nEIID){
  switch (pa_nEIID){
    case scm_nEventREQID:
      create_bumpdrop();
      CasterDrop() = gc_fdrop;
      LtDrop() = gc_ldrop;
      RtDrop() = gc_rdrop;
      sendOutputEvent(scm_nEventCNFID);
      break;
  }
}
Exemple #4
0
//this function will update the values for many of the sensor globals above
//serial connection failure codes are
// -1:create_mode, -2:create_wall, -3:create_buttons, -4:create_bumpdrop, -5:create_cliffs,
// -6:create_angle, -7:create_distance, -8:create_velocity, -9:create_read_IR 
int create_sensor_update()
{
	int r=0; // if serial connection times out, bit positions give the functions where it occurred
	r=r-2*create_wall();
	r=r-4*create_buttons();
	r=r-8*create_bumpdrop();
	r=r-16*create_cliffs();
	r=r-32*create_angle();
	r=r-64*create_distance();
	r=r-128*create_velocity();
	return(r);
}