switch to new cmd scheme
This commit is contained in:
parent
ac99c29e82
commit
5390f76131
@ -5377,4 +5377,3 @@ LEVEL level0 = {
|
||||
&level0_nodegnd,
|
||||
&level0_meshPlan
|
||||
};
|
||||
|
||||
|
@ -321,4 +321,3 @@ extern NODE level0_nodegnd_001;
|
||||
extern NODE level0_nodegnd_002;
|
||||
|
||||
extern NODE level0_nodegnd_003;
|
||||
|
||||
|
@ -10989,4 +10989,3 @@ LEVEL level1 = {
|
||||
&level1_nodegnd_002,
|
||||
&level1_meshPlan
|
||||
};
|
||||
|
||||
|
@ -345,4 +345,3 @@ extern NODE level1_nodegnd_001;
|
||||
extern NODE level1_nodegnd_002;
|
||||
|
||||
extern NODE level1_nodegnd_003;
|
||||
|
||||
|
18
loadlvl.py
18
loadlvl.py
@ -237,7 +237,7 @@ def WriteBytes( inData ):
|
||||
|
||||
if DEBUG:
|
||||
|
||||
print( str ( numChunk + 1 - currentChunk ) + " chunks of " + str ( chunkSize) + "bytes to send " )
|
||||
print( str ( numChunk + 1 - currentChunk ) + " chunks of " + str ( chunkSize) + " bytes to send " )
|
||||
|
||||
# Avoid going out of range
|
||||
|
||||
@ -257,6 +257,10 @@ def WriteBytes( inData ):
|
||||
|
||||
# Send byte
|
||||
|
||||
if DEBUG > 1:
|
||||
|
||||
print("Writing " + str( inData[ i + byte ].to_bytes(1, byteorder='little', signed=False) ) + " to serial..." )
|
||||
|
||||
ser.write( inData[ i + byte ].to_bytes(1, byteorder='little', signed=False) )
|
||||
|
||||
# Calculate chunk checksum
|
||||
@ -419,7 +423,7 @@ def SendBin( inData, memAddr ):
|
||||
|
||||
def resetListener():
|
||||
|
||||
global checkSum, data, Listen, Transfer, dataSize, memAddr, loadFile, flagAddr
|
||||
global checkSum, data, Listen, Transfer, dataSize, memAddr, loadFile, flagAddr, levelId
|
||||
|
||||
memAddr = ""
|
||||
|
||||
@ -435,6 +439,8 @@ def resetListener():
|
||||
|
||||
Transfer = 0
|
||||
|
||||
levelId = 0
|
||||
|
||||
Listen = 1
|
||||
|
||||
ser.reset_input_buffer()
|
||||
@ -559,7 +565,7 @@ def main(args):
|
||||
|
||||
"File : " + loadFile + "\n" +
|
||||
|
||||
"Bin : " + binFileName + "ID : " + str(levelId)
|
||||
"Bin : " + binFileName + " - ID : " + str(levelId)
|
||||
|
||||
)
|
||||
|
||||
@ -597,6 +603,12 @@ def main(args):
|
||||
|
||||
# Set level changed flag
|
||||
|
||||
if DEBUG:
|
||||
|
||||
print("Sending value " + str( levelId.to_bytes(1, byteorder='little', signed=False) ) + " to " + flagAddr )
|
||||
|
||||
time.sleep( sleepTime )
|
||||
|
||||
SendBin( levelId.to_bytes(1, byteorder='little', signed=False) , flagAddr)
|
||||
|
||||
# Reset everything
|
||||
|
19
main.c
19
main.c
@ -29,9 +29,9 @@
|
||||
#include "physics.h"
|
||||
#include "graphics.h"
|
||||
#include "space.h"
|
||||
#include "pcdrv.h"
|
||||
//~ #include "pcdrv.h"
|
||||
|
||||
//~ #define USECD
|
||||
#define USECD
|
||||
|
||||
// START OVERLAY
|
||||
|
||||
@ -77,8 +77,12 @@ u_long overlaySize = 0;
|
||||
|
||||
// Level
|
||||
|
||||
u_short level = 1;
|
||||
volatile u_char level = 1;
|
||||
|
||||
// level 1 : 8003F05C -2147225508
|
||||
// level 0 : 800AF744 -2146764988
|
||||
// 80010000 -2147418112 -> -2147483648
|
||||
// ovl : 800b80d4 -2146729772
|
||||
u_short levelWas = 0;
|
||||
|
||||
u_short levelHasChanged = 0;
|
||||
@ -124,7 +128,9 @@ CAMERA camera = {0};
|
||||
|
||||
// physics
|
||||
|
||||
long time = 0;
|
||||
u_long time = 0;
|
||||
|
||||
u_long timeS = 0;
|
||||
|
||||
//Pad
|
||||
|
||||
@ -357,6 +363,8 @@ int main() {
|
||||
|
||||
while ( VSync(1) ) {
|
||||
|
||||
timeS = VSync(-1) / 60;
|
||||
|
||||
if ( levelWas != level ){
|
||||
|
||||
switch ( level ){
|
||||
@ -1084,7 +1092,7 @@ int main() {
|
||||
|
||||
//~ FntPrint("curLvl.curNode : %x\nIndex: %d", curLvl.curNode, curLvl.curNode->siblings->index);
|
||||
|
||||
FntPrint("Time : %d dt :%d\n", VSync(-1) / 60, dt);
|
||||
FntPrint("Time : %d dt :%d", timeS, dt);
|
||||
|
||||
//~ FntPrint("%d\n", curCamAngle );
|
||||
//~ FntPrint("%x\n", primbuff[db]);
|
||||
@ -1412,7 +1420,6 @@ void callback() {
|
||||
|
||||
lastPad = PADL;
|
||||
|
||||
|
||||
}
|
||||
|
||||
if( theControllers[0].type == 0x73 && camMode == 0){
|
||||
|
Loading…
Reference in New Issue
Block a user