kaha Posted June 23, 2023 Report Posted June 23, 2023 John, I've got a question: What's the better choice? To split code in seperate files like this: ------------ file 1 ---------------------------- function throttle1(offset, value) function throttle2(offset, value) event.offset (0x25F0, "SW", "throttle1") event.offset (0x25F2, "SW", "throttle2") ------------ file 2 ---------------------------- function mixture1(offset, value) function mixture2(offset, value) event.offset (0x2550, "SW", "mixture1") event.offset (0x2552, "SW", "mixture2") Or put everything in one file? Thank you, Karl
John Dowson Posted June 23, 2023 Report Posted June 23, 2023 Either way is fine, its up to your personal preference. Some people like to use separate scripts, others prefer fewer but larger scripts. You can also use the same handling function for throttle1 and throttle2 (as well as one for mixture1 and mixture2) and use a conditional statement in the handling function based on the offset value to handle things separately (or set things up separately) for each throttle. But again, thats just personal preference - no problem having separate functions. Cheers, John
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now