/* * Class: cbccore_low_Create * Method: create_cliffs * Signature: ()I */ JNIEXPORT jint JNICALL Java_cbccore_low_Create_create_1cliffs(JNIEnv *env, jobject obj) { #ifdef CBC return create_cliffs(); #else printf("Java_cbccore_low_Create_create_1cliffs stub\n"); return -1; #endif }
//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); }