- Posts: 55
deviation-devo10-v4.0.1-265430d USB wont turn off
- aperseghin
- Topic Author
- Offline
Please Log in or Create an account to join the conversation.
- vlad_vy
- Offline
- Posts: 3333
Please Log in or Create an account to join the conversation.
- aperseghin
- Topic Author
- Offline
- Posts: 55
Please Log in or Create an account to join the conversation.
- Sero
- Offline
- RC-addicted
- Posts: 106
A day without flying can't be called a day.
Please Log in or Create an account to join the conversation.
- Serg_S
- Offline
- Posts: 8
In this build honored PhracturedBlue make changes related to USB in src/misc.c module.
Present USB behavior is consequet to these changes.
I've checked: if DFU is compiled using an old version of misc.c (before commit ef0d76d), the USB will be turned OFF.
So we must ask the forum's gurus to replace misc.c in bitbucket.org/deviationtx/ repository with the old version of misc.c.
PS
I have DEVO 10.
Please Log in or Create an account to join the conversation.
- Deal57
- Offline
- Posts: 857
For developers: is it possible someone could use the menu to start the USB, then edit a file that deviation has already loaded, causing some potential conflict? IF that's the case, I suggest we remove the menu item, as the current behavior seems confusing. Given the code size for the Devo7e, does that save us any more space?
Deviation Devo7e 3way switch mod, A7105, NRF24L01
Devo6s 2x2 switch mod, trim mod, haptic, multimodule, A7105, NRF24L01, CC2500
Devo12e 4-in-1 with voice mod -- it speaks!!
Please Log in or Create an account to join the conversation.
- aperseghin
- Topic Author
- Offline
- Posts: 55
the USB functionality has never had a problem until, as you have expressed, last fall. the nice thing about it is that it allows you to program and test in a much more efficient way. Removing it is not the solution.
where are the links for the repo (is it on github) ill give try to drill down and see it i can find any issues.
Please Log in or Create an account to join the conversation.
- aperseghin
- Topic Author
- Offline
- Posts: 55
The same thing happens in the EMU also
once you click USB on the console prints
wait release
and thats it.
what does "wait release" mean
Please Log in or Create an account to join the conversation.
- aperseghin
- Topic Author
- Offline
- Posts: 55
static struct usb_page * const up = &pagemem.u.usb_page;
static void _draw_page(u8 enable);
void wait_release();
void wait_press();
unsigned usb_cb(u32 button, unsigned flags, void *data)
{
(void)button;
(void)data;
if(flags == BUTTON_RELEASE) {
_draw_page(1);
GUI_RefreshScreen();
USB_Enable(0, 1);
wait_release();
wait_press();
wait_release();
USB_Disable();
_draw_page(0);
}
return 1;
}
void PAGE_USBInit(int page)
{
(void)page;
PAGE_SetModal(0);
_draw_page(0);
BUTTON_RegisterCallback(&up->action, CHAN_ButtonMask(BUT_ENTER), BUTTON_PRESS | BUTTON_RELEASE | BUTTON_PRIORITY, usb_cb, NULL);
}
void PAGE_USBExit()
{
BUTTON_UnregisterCallback(&up->action);
}
is this right? is wait_release there to many times or in the wrong order?
Please Log in or Create an account to join the conversation.
- FDR
- Offline
Please Log in or Create an account to join the conversation.
- aperseghin
- Topic Author
- Offline
- Posts: 55
unsigned usb_cb(u32 button, unsigned flags, void *data)
{
(void)button;
(void)data;
if(flags == BUTTON_RELEASE) { # here
_draw_page(1);
GUI_RefreshScreen();
USB_Enable(0, 1);
wait_release(); #here
wait_press();
wait_release(); #here
USB_Disable();
_draw_page(0);
}
return 1;
}
shouldn't it be waiting for a "press" then "release" not release-press-release
Please Log in or Create an account to join the conversation.
- mwm
- Offline
I believe the current sequence is correct. The button is pressed, so we enable USB and then wait for it to be pressed and released again. But that could also be problematic.
My temptation is to change the message to say "unmount the drive and power off" rather than allowing it to be turned off. Or as suggrested, just remove this feature. It's missing on the 7e (space issues), and was taken out on the 10 with that change and nobody noticed for over a year.
Do not ask me questions via PM. Ask in the forums, where I'll answer if I can.
My remotely piloted vehicle ("drone") is a yacht.
Please Log in or Create an account to join the conversation.
- aperseghin
- Topic Author
- Offline
- Posts: 55
Please Log in or Create an account to join the conversation.
- hexfet
- Offline
- Posts: 1891
Serg_S wrote: The problem began with the nightly build ef0d76d from 07.26.2015.
I've never had a problem with corrupted files or filesystem on my devo10. In any case this change is unrelated to any problems with mounting/unmounting - it was just an invalid test.
Please Log in or Create an account to join the conversation.
- aperseghin
- Topic Author
- Offline
- Posts: 55
Please Log in or Create an account to join the conversation.
- aperseghin
- Topic Author
- Offline
- Posts: 55
667678f
that when I calibrate the screen does not clear before writing "calibration done" to the screen
NOTE: i am using small fonts
this does not effect the ability to calibrate.
not sure if this is only with small fonts
Please Log in or Create an account to join the conversation.
- dalgibbard
- Offline
- Posts: 2
Edit: Seems like using the 'PPM' or 'USBHID' protocols don't work?
Edit2: I get a "Bad/Missing modules" error when powering on my TX also; but only protocols requiring CC2500 module are flagged (I don't have this module) - i'm using the tx.ini and hardware.ini from the previous build I was using.
Edit3: Flashed 'b381655' over the top - all works OK.
Please Log in or Create an account to join the conversation.
- Deal57
- Offline
- Posts: 857
Additionally, I've got both PPM output and HID. On HID, reinit seems to reinitialize the USB port.
So this looks really good to me.
It really does work as expected... in my haste to test a few other things I used this feature and turned on the USB to edit the Hardware.ini file, saved the file, then turned off the USB... and shutdown... oooh, what did I forget? Yeah, had to reformat the USB drive and restore from backup. This is dangerous, but it works exactly as expected.
Deviation Devo7e 3way switch mod, A7105, NRF24L01
Devo6s 2x2 switch mod, trim mod, haptic, multimodule, A7105, NRF24L01, CC2500
Devo12e 4-in-1 with voice mod -- it speaks!!
Please Log in or Create an account to join the conversation.
- vlad_vy
- Offline
- Posts: 3333
Please Log in or Create an account to join the conversation.
- mwm
- Offline
The only really safe way to get all the config files reloaded is a reset. Well, we could rewrite the reset code to have a mode that checks all the file dates and optionally reloaded them, but that's a bit much just for this. Makes me think we ought to either take out USB mode, make exiting it reset the Tx, or maybe make it read-only.
But if everyone else is happy with it as is, I'll leave it
Do not ask me questions via PM. Ask in the forums, where I'll answer if I can.
My remotely piloted vehicle ("drone") is a yacht.
Please Log in or Create an account to join the conversation.
- Home
- Forum
- Development
- Development
- deviation-devo10-v4.0.1-265430d USB wont turn off