void WSrcDeck::updateCounts() { vector<MTGCard*>::iterator it; map<int, int>::iterator ccount; clearCounts(); for (it = cards.begin(); it != cards.end(); it++) { ccount = copies.find((*it)->getMTGId()); if (ccount == copies.end()) continue; addCount((*it), ccount->second); } }
void shaftEncodingTurnLeft(int percent, int counts) { //Reset encoder counts clearCounts(); //Set both motors to desired percent turnLeft(percent); //While the average of the left and right encoder are less than counts, //keep running motors while(updateCount() < counts){ LCD.WriteLine(updateCount()); } //Turn off motors stop(); }
void shaftEncodingStraight(int percent, double distance) { int counts = 318*distance/(2.5*3.1415); //Reset encoder counts clearCounts(); //Set both motors to desiRED_LIGHT percent drive(percent); //While the average of the left and right encoder are less than counts, //keep running motors while(updateCount() < counts){ LCD.WriteLine(updateCount()); } //Turn off motors stop(); }
MockSurface(int width, int height) : SkSurface_Base(width, height, NULL) { clearCounts(); fBitmap.allocN32Pixels(width, height); }