MCPcopy Create free account
hub / github.com/ArduPilot/ardupilot / getjumpcontrol

Function getjumpcontrol

libraries/AP_Scripting/lua/src/lcode.c:186–192  ·  view source on GitHub ↗

** Returns the position of the instruction "controlling" a given ** jump (that is, its condition), or the jump itself if it is ** unconditional. */

Source from the content-addressed store, hash-verified

184** unconditional.
185*/
186static Instruction *getjumpcontrol (FuncState *fs, int pc) {
187 Instruction *pi = &fs->f->code[pc];
188 if (pc >= 1 && testTMode(GET_OPCODE(*(pi-1))))
189 return pi-1;
190 else
191 return pi;
192}
193
194
195/*

Callers 3

patchtestregFunction · 0.85
need_valueFunction · 0.85
negateconditionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected